BlackRock | Associate | Java Backend Developer | Mumbai | Interview Experience

blackrock logo
blackrock
· Java Backend Developer· Mumbai
March 25, 2026 · 0 reads

Summary

I attended a 45‑minute interview for a Java Backend Developer role at BlackRock in Mumbai, which included a coding problem on HackerRank, a string‑frequency task, and several Java and system‑design questions.

Full Experience

Interview 1: 45mins

  1. Coding Question asked on HackerRank CodePair Platform
Process Scheduling
A multiprocessor system contains several processors, where ability[i] represents the number of processes the ith processor can schedule in one second.

Problem Description
In each second, you can choose any one processor and use it to schedule up to its current ability. 
Once a processor is used:
It schedules the processes (up to its maximum current capacity).
Its ability is reduced to ⌊ability/2⌋.
The goal is to determine the minimum time (in seconds) required to schedule all given processes.

Example
Input:
ability = [3, 1, 7, 2, 4]
processes = 15

Output: 4
Explanation:
Second 1: Use processor with ability 7. Processes remaining: 15−7=8. New ability: ⌊7/2⌋=3.
Second 2: Use processor with ability 4. Processes remaining: 8−4=4. New ability: ⌊4/2⌋=2.
Second 3: Use processor with ability 3. Processes remaining: 4−3=1. New ability: ⌊3/2⌋=1.
Second 4: Use processor with ability 1. Processes remaining: 1−1=0.

Total time taken: 4 seconds.

Constraints
1≤ size of ability ≤10^5
1≤ ability[i] ≤10^6
1≤ processes ≤10^12
 
It is guaranteed that the processes can be scheduled using the given system.

Solution:

public static int minimumTime(List<Integer> ability, long processes) {
    
        int ans = 0;
        PriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());
        
        for(int a: ability) {
            pq.add(a);
        }

        long rem = processes;
        
        while(!pq.isEmpty()) {
            Integer pr = pq.poll();
            rem = rem - pr;
            pr = pr/2;
            
            if(pr != 0)
                pq.offer(pr);
            ans++;
            if(rem<= 0) {
                break;
            }
        }
        
        return ans;
    }
  1. Calculate frequency of the given string (solved on notepad) - need to solve using streams
  2. Technical Questions
    • HashMap internal implementation, hashCode() working, What happens when we ovveride hashCode()?
    • Java Multithreading - synchronized block, ExecutorService
    • Microservices - Circuit Breaker
    • Difference between @Component and @Configuration
    • Bean Lifecycle
    • Kafka working

Interview Questions (1)

1.

Process Scheduling

Data Structures & Algorithms

A multiprocessor system contains several processors, where ability[i] represents the number of processes the i‑th processor can schedule in one second.

Problem Description In each second, you can choose any one processor and use it to schedule up to its current ability. Once a processor is used, it schedules the processes (up to its maximum current capacity) and its ability is reduced to ⌊ability/2⌋.

Goal Determine the minimum time (in seconds) required to schedule all given processes.

Example

Input:
ability = [3, 1, 7, 2, 4]
processes = 15

Output: 4

Explanation:

  • Second 1: Use processor with ability 7 → remaining processes 8, new ability 3.
  • Second 2: Use processor with ability 4 → remaining processes 4, new ability 2.
  • Second 3: Use processor with ability 3 → remaining processes 1, new ability 1.
  • Second 4: Use processor with ability 1 → remaining processes 0.

Constraints

  • 1 ≤ size of ability ≤ 10⁵
  • 1 ≤ ability[i] ≤ 10⁶
  • 1 ≤ processes ≤ 10¹²
  • It is guaranteed that the processes can be scheduled using the given system.

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!