BlackRock interview questions

145 questions from 15 interviews · updated from reports 2016-2024

Practise BlackRock-style

About

BlackRock is an investment management company that provides asset management, risk management, and technology services such as the Aladdin platform. In India, it is known to hire technical candidates for Software Engineer, SDE, intern, data, and technology operations roles.

The roles that come up most are Software Engineer, Intern and SDE. This covers 15 candidate interviews reported from 2016 to 2024. Most sat it at internship level (8 of 15 that recorded a level). Among the 14 that recorded either route, arrivals split between campus drives (14, 100%). Most questions fall under CS fundamentals and DSA.

Category
Difficulty
Round

Interview questions

Q. Perform inorder, preorder, and postorder traversals of a given binary tree.

asked 2xeasyTreesOnline test, Technical2020-2024

Ans. Inorder visits left subtree, root, then right subtree; preorder visits root, left, then right; postorder visits left, right, then root. Use recursion, or an explicit stack if recursion is not allowed. Each traversal visits every node once, so time is O(n) and space is O(h).

Q. What is a smart pointer in C++?

asked 1xmediumOOPTechnical2020

Ans. A smart pointer in C++ is an object that wraps a raw pointer and manages the lifetime of the pointed-to resource automatically. The key detail is RAII: when the smart pointer goes out of scope, it releases the resource, helping prevent memory leaks and dangling ownership. Common examples are unique_ptr and shared_ptr.

Q. Explain the volatile keyword in Java

asked 1xmediumOOPTechnical2023

Ans. volatile in Java marks a variable so reads and writes go directly to main memory, making updates visible across threads. A write to a volatile variable happens before later reads of it, which also restricts reordering. It does not make compound actions like increment atomic, so it is not a replacement for synchronisation.

Q. How does the garbage collector work?

asked 1xmediumOOPTechnical2018

Ans. A garbage collector automatically frees memory by finding objects that are no longer reachable from live references. It usually starts from roots such as stack variables, globals and registers, marks reachable objects, then reclaims unmarked ones. The key detail is reachability, not whether an object might still be logically useful.

Q. Explain RAID and its different levels.

asked 1xmediumOperating systemsTechnical2024

Ans. RAID combines multiple disks to improve performance, reliability, or both. RAID 0 stripes data for speed but has no redundancy. RAID 1 mirrors data for fault tolerance. RAID 5 uses striping with distributed parity and can survive one disk failure. RAID 6 survives two failures. RAID 10 combines mirroring and striping.

Q. How is a String stored in Java memory?

asked 1xmediumOOPTechnical2021

Ans. A Java String is an object stored on the heap, with its character data held internally, usually as a byte array in modern Java. String literals are placed in the String pool, a special heap area that reuses equal literal values. Strings are immutable, so changes create new String objects rather than modifying existing ones.

Q. Explain the String Pool concept in Java

asked 1xmediumOOPTechnical2023

Ans. The String Pool in Java is a special heap area where JVM stores unique string literals to reuse them. If two literals have the same text, they usually reference the same object, saving memory. Strings are immutable, so sharing is safe. Using new String creates a separate object unless intern() is used.

Q. Explain how vector works internally in C++.

asked 1xmediumOOPTechnical2020

Ans. A C++ vector is a dynamic array that stores elements in contiguous memory, with a current size and a larger capacity. When capacity is full, it allocates a bigger block, moves or copies existing elements, then frees the old block. Indexing is constant time, and push_back is amortised constant time.

Q. How can errors be reduced in linear regression?

asked 1xmediumMachine learningTechnical2020

Ans. Errors in linear regression can be reduced by improving the data, choosing better features, and preventing overfitting. Clean missing values and outliers, remove irrelevant variables, add useful transformations or interaction terms, and use regularisation such as Ridge or Lasso. Always validate on unseen data to check that the model generalises well.

Q. Write a program that creates a dangling pointer

asked 1xmediumOOPTechnical2018

Ans. Create a dangling pointer by storing the address of a local stack variable, then using that pointer after the function returns. The pointer still holds an address, but the object’s lifetime has ended, so dereferencing it is undefined behaviour. This uses a raw pointer and runs in constant time.

Q. Explain a shortest path algorithm used in graphs.

asked 1xmediumGraphsTechnical2024

Ans. Dijkstra’s algorithm finds the shortest path from one source vertex to all other vertices in a weighted graph with non-negative edge weights. It keeps tentative distances, repeatedly picks the unvisited vertex with the smallest distance using a priority queue, and relaxes its edges. With an adjacency list, it runs in O((V + E) log V).

Q. Using 6 matchsticks, how can you form 4 triangles?

asked 1xmediumLogical reasoningTechnical2020

Ans. Use the 6 matchsticks as the 6 edges of a tetrahedron, which is a triangular pyramid. Make one triangle as the base with 3 sticks, then use the other 3 sticks to connect each base corner to a single point above it. The result has 4 triangular faces.

Q. Explain JWT tokens and their use in authentication.

asked 1xmediumNetworkingTechnical2023

Ans. JWT tokens are signed strings that carry identity and claims, used to authenticate requests without storing session state on the server. After login, the server issues a token, the client sends it with later requests, and the server verifies its signature, expiry, and claims. JWTs are not encrypted by default, so avoid storing secrets inside them.

Q. Write code to find the Right View of a Binary Tree.

asked 1xmediumTreesTechnical2024

Ans. Use level order traversal and record the last node seen at each level to get the right view of a binary tree. Maintain a queue for BFS, process nodes level by level, and append the final node’s value from each level. Time complexity is O(n), space complexity is O(w).

Q. How do you implement a const member function in C++?

asked 1xmediumOOPTechnical2020

Ans. Implement a const member function by adding const after the parameter list in both the class declaration and the out-of-class definition. This makes the this pointer point to const, so the function cannot modify non-mutable data members and can only call other const member functions on the same object.

Q. SQL query using joins and subqueries on three tables

asked 1xmediumSQLTechnical2023

Ans. Join the three tables through their foreign key relationships, then use a subquery only for filtering or aggregation that cannot be expressed clearly in the join. Start from the main entity, join related tables on keys, and filter with EXISTS, IN, or a derived aggregate. Index the join and filter columns.

Q. Difference between String pool and heap memory in Java

asked 1xmediumOOPTechnical2021

Ans. The String pool is a special area of heap memory that stores one shared copy of each interned String, while normal heap memory stores ordinary objects, including String objects created with new. String literals usually go into the pool, so equal literals can share the same reference. Calling intern() can add or reuse a pooled String.

Q. Write code to demonstrate runtime polymorphism in C++.

asked 1xmediumOOPTechnical2019

Ans. Use a base class with a virtual function, then override it in derived classes and call it through a base class pointer or reference. For example, Shape can define virtual draw, while Circle and Square implement it differently. Store base pointers in a vector. Each virtual call is O(1).

Q. Explain the four pillars of object-oriented programming.

asked 1xmediumOOPTechnical2019

Ans. The four pillars of object-oriented programming are encapsulation, abstraction, inheritance, and polymorphism. Encapsulation hides internal state behind methods. Abstraction exposes only essential behaviour. Inheritance lets classes reuse and extend other classes. Polymorphism lets different objects be treated through the same interface while providing their own behaviour.

Q. Find the next greater number with the same set of digits

asked 1xmediumArraysTechnical2021

Ans. Scan digits from right to left to find the first digit smaller than the digit after it. Swap it with the smallest larger digit to its right, then sort or reverse the suffix into ascending order. If no such digit exists, no greater number is possible. This is the next permutation algorithm, O(n) time.

Q. Explain AWS Lambda and its use cases in a backend system.

asked 1xmediumCloud computingTechnical2022

Ans. AWS Lambda is a serverless compute service that runs backend code in response to events without managing servers. It is commonly used for API handlers, file processing, scheduled jobs, queue consumers, and glue logic between AWS services. The key detail is that it scales automatically and charges per execution time, but has runtime and cold-start limits.

Q. Explain compile-time polymorphism and runtime polymorphism.

asked 1xmediumOOPTechnical2019

Ans. Compile-time polymorphism means the method or operation to call is chosen by the compiler, usually through method overloading or operator overloading. Runtime polymorphism means the call is chosen while the program runs, usually through method overriding and dynamic dispatch. The key difference is early binding versus late binding.

Q. Explain synchronization in Java and how threads are managed

asked 1xmediumOperating systemsTechnical2023

Ans. Synchronization in Java controls access to shared data so only one thread at a time can execute a critical section. It is done with synchronized methods or blocks, locks, volatile, and concurrent utilities. Threads are managed through the Thread class, Runnable, executors, scheduling by the JVM, and states such as running, waiting, and blocked.

Q. How does a Django backend connect to a PostgreSQL database?

asked 1xmediumBackendTechnical2022

Ans. A Django backend connects to PostgreSQL through the DATABASES setting in settings.py, using the PostgreSQL engine and connection details such as database name, user, password, host and port. The key requirement is having the PostgreSQL driver installed, typically psycopg or psycopg2, so Django’s ORM can open connections and run queries.

Q. Write an SQL query using JOINs and a query using a subquery.

asked 1xmediumSQLTechnical2020

Ans. Use a JOIN to return customers with their orders by matching Customer.id to Order.customer_id, and use a subquery to return customers whose id appears in the orders table. The JOIN is best when you need columns from both tables. The subquery is useful when filtering one table using results from another.

Q. Explain merge sort and quick sort algorithms and compare them.

asked 1xmediumSortingTechnical2023

Ans. Merge sort splits the array, recursively sorts each half, then merges them, while quick sort chooses a pivot, partitions elements around it, then recursively sorts the partitions. Merge sort is stable and always O(n log n) but needs extra space. Quick sort is usually faster in place, but worst case is O(n²).

Q. Explain const and static keywords in C++ and their differences.

asked 1xmediumOOPTechnical2020

Ans. const means a value should not be modified through that name, while static changes lifetime, linkage, or sharing depending on where it is used. A static local variable keeps its value between calls. A static global has internal linkage. A static class member belongs to the class, not each object. Const is about mutability, static is about storage and ownership.

Q. Answer questions on tree traversals and properties of AVL trees.

asked 1xmediumTreesOnline test2020

Ans. Tree traversals are preorder, inorder, postorder and level order, and an AVL tree is a self-balancing binary search tree. Inorder traversal of a BST gives sorted order. In an AVL tree, the height difference between left and right subtrees of every node is at most one, so search, insert and delete take O(log n).

Q. How do you find a particular word from a given sentence using R?

asked 1xmediumStringsTechnical2016

Ans. Use R’s pattern matching functions, usually grepl, to check whether the sentence contains the word. For an exact word match, search with word boundaries so substrings are not counted, such as matching “cat” but not “catalogue”. The sentence is a character string, and the search is linear in the sentence length.

Q. Write an SQL query to find the second-highest record from a table.

asked 1xmediumSQLTechnical2024

Ans. Use a subquery or window function to rank rows by the target column in descending order, then select the row with rank 2. Use DENSE_RANK if ties should count as one position, such as duplicate highest salaries. The database sorts the rows, so the typical time complexity is O n log n.

Q. Given an array of integers, find all possible Pythagorean triplets.

asked 1xmediumArraysTechnical2020

Ans. Square all numbers, sort them, then for each largest square use two pointers on the smaller squares to find pairs whose sum equals it. Each match gives a Pythagorean triplet using the original values. The key detail is sorting enables the two-pointer scan, giving O(n²) time after O(n log n) sorting.

Q. Solve logical reasoning questions based on patterns and deductions.

asked 1xmediumLogical reasoningOnline test2023

Ans. Identify the given rules, separate facts from assumptions, and look for repeated relationships such as order, number change, direction, grouping, or exclusion. Test each option against all conditions, not just one. For deductions, use elimination and simple diagrams or tables to track what must, may, and cannot be true.

Q. Find the shortest distance between two nodes in a Binary Search Tree

asked 1xmediumTreesTechnical2021

Ans. Find the lowest common ancestor of the two nodes, then add the distance from that ancestor to each node. In a BST, find the ancestor by moving left if both values are smaller, right if both are larger, otherwise stop. The time complexity is O(h), where h is tree height.

Q. Find the length of the longest substring without repeating characters

asked 1xmediumStringsTechnical2018

Ans. Use a sliding window and a hash map of each character’s most recent index to find the longest substring without repeats. Move the right pointer through the string; if a character was seen inside the current window, move the left pointer just after its previous index. Track the maximum window length. Time is O(n), space is O(k).

Q. Compare all major sorting algorithms based on time and space complexity.

asked 1xmediumSortingTechnical2023

Ans. Bubble, selection and insertion sort are O(n²) average and worst, with O(1) space; insertion is O(n) best. Merge sort is O(n log n) time and O(n) space. Quick sort averages O(n log n), worst O(n²), using O(log n) stack space. Heap sort is O(n log n) with O(1) space. Radix/counting sort can be linear with extra space.

Q. How is data stored and formatted in MongoDB, and when should it be used?

asked 1xmediumDBMSTechnical2024

Ans. MongoDB stores data as BSON documents, a binary form of JSON, grouped into collections rather than relational tables. Each document can have a flexible structure with nested fields and arrays. Use it when data is document-shaped, schemas change often, and you need fast development, horizontal scaling, or high-volume reads and writes.

Q. Answer attention-to-detail questions accurately under strict time limits.

asked 1xmediumLogical reasoningOnline test2016

Ans. Scan systematically rather than reading randomly. First identify what must be checked, such as numbers, names, dates, spelling, or order. Compare one element at a time, using your finger or cursor if allowed. Mark obvious mismatches quickly, avoid assumptions, and leave uncertain items to revisit after completing easier checks.

Q. Explain AVL trees and answer questions related to balancing and rotations.

asked 1xmediumTreesOnline test2020

Ans. An AVL tree is a self-balancing binary search tree where, for every node, the height difference between left and right subtrees is at most one. After insertion or deletion, update heights, compute balance factors, and fix imbalance using rotations: left-left uses right rotation, right-right uses left rotation, and left-right or right-left use double rotations. Operations stay O(log n).

Q. Find all distinct pairs in an array whose sum is equal to a given number K.

asked 1xmediumArraysTechnical2019

Ans. Use a hash set to track numbers already seen, and for each value x, check whether K minus x has appeared before. To return distinct pairs, store each found pair in sorted order in another set, so duplicates are ignored. This takes O(n) average time and O(n) extra space.

Q. Given two hourglasses of 4 minutes and 7 minutes, measure exactly 9 minutes

asked 1xmediumLogical reasoningTechnical2021

Ans. Start both hourglasses together. When the 4-minute glass finishes at 4 minutes, turn it over. When the 7-minute glass finishes at 7 minutes, turn it over. At 8 minutes, the 4-minute glass finishes again. Turn the 7-minute glass over then. It has only 1 minute of sand, so it finishes at 9 minutes.

Q. What are AWS IAM roles and how are they configured and used in applications?

asked 1xmediumCloud computingTechnical2022

Ans. AWS IAM roles are identities with permissions that applications or AWS services can assume to access resources securely. They are configured with a trust policy defining who can assume the role and permission policies defining allowed actions. Applications use roles through attached service roles or STS AssumeRole, receiving temporary credentials instead of storing long-term keys.

Q. Form a Binary Search Tree and determine its preorder and postorder traversals.

asked 1xmediumTreesOnline test2023

Ans. Insert the given keys into the Binary Search Tree one by one, placing smaller values in the left subtree and larger values in the right subtree. Preorder traversal then visits root, left, right. Postorder traversal visits left, right, root. Construction takes O(nh) time, where h is the tree height.

Q. Implement a Stack using Queues and explain the approach with sample input/output

asked 1xmediumStack queueTechnical2020

Ans. Use two queues: push the new element into the empty helper queue, move all existing elements after it, then swap the queues. This keeps the newest element at the front, so pop and top are O(1), while push is O(n). Example: push 10, push 20, top gives 20, pop gives 20, pop gives 10.

Q. Solve aptitude problems involving quantitative reasoning under time constraints.

asked 1xmediumQuantitativeOnline test2023

Ans. I quickly identify the question type, write down the key numbers, and choose the fastest method, such as ratios, percentages, unitary method, or approximation. I avoid lengthy algebra unless needed. I check units, estimate the answer range, eliminate unlikely options, and only then calculate carefully enough to meet the time limit.

Q. Count ASCII values of characters in a string and replace them with the maximum value.

asked 1xmediumStringsTechnical2024

Ans. Scan the string to find the maximum ASCII value, then build a new string where every character is replaced by the character having that maximum value. Use a simple integer variable for the maximum and a character buffer or string builder for the result. This takes O(n) time and O(n) space.

Q. Find all pairs in an array such that their sum is equal to K without using a hashmap.

asked 1xmediumArraysTechnical2020

Ans. Sort the array, then use two pointers, one at the start and one at the end. If the sum is K, record the pair and move both pointers. If the sum is smaller, move left forward; if larger, move right backward. Time is O(n log n), space is O(1).

Q. Logical reasoning and mathematical aptitude questions (including attention to detail)

asked 1xmediumLogical reasoningOnline test2018

Ans. Break the problem into facts, conditions, and what is being asked. Translate words into simple equations, tables, diagrams, or cases. Check units, order, exclusions, and hidden constraints carefully. Work step by step, eliminate impossible options, and verify the result against the original question to avoid careless mistakes.

Q. Choose the correct SQL query to produce the given output from a provided database schema.

asked 1xmediumSQLOnline test2020

Ans. The correct SQL query cannot be chosen without the schema, expected output, and answer options. The key detail is matching the required rows and columns using the right joins, filters, grouping, and ordering based on the table relationships and the exact output shown.

Q. Explain the difference between compareTo(), equals(), and == when comparing strings in Java.

asked 1xmediumOOPTechnical2020

Ans. In Java, == checks whether two string references point to the same object, equals() checks whether two strings have the same characters, and compareTo() compares strings lexicographically. The key detail is to use equals() for content equality, not ==, because different String objects can contain identical text.

Q. Is it possible to change the data of a variable inside a const member function? If yes, how?

asked 1xmediumOOPTechnical2020

Ans. Yes, but only in limited ways. A const member function cannot normally modify the object’s data members, but members declared mutable may be changed, commonly for caches or counters. You can also use const_cast, but modifying an object that was originally const gives undefined behaviour, so it should be avoided.

Q. Optimize the code for generating the Fibonacci series and explain the approach from scratch.

asked 1xmediumDynamic programmingTechnical2016

Ans. Generate the Fibonacci series iteratively using two variables to store the previous two numbers, rather than using naive recursion. Start with 0 and 1, print or store each next value as their sum, then shift the two variables forward. This runs in O(n) time and uses O(1) extra space.

Q. Explain OOP concepts in C++ such as inheritance, operator overloading, and method overriding.

asked 1xmediumOOPTechnical2024

Ans. Inheritance lets a class reuse and extend another class, operator overloading gives custom meaning to operators for user-defined types, and method overriding lets a derived class replace a base class’s virtual method. The key detail is runtime polymorphism: overriding works through base pointers or references only when the base method is virtual.

Q. What is a deadlock in operating systems and what are the necessary conditions for it to occur?

asked 1xmediumOperating systemsTechnical2024

Ans. A deadlock is a state where two or more processes are permanently blocked because each is waiting for a resource held by another. It requires four conditions: mutual exclusion, hold and wait, no preemption, and circular wait. Preventing or breaking any one of these conditions prevents deadlock.

Q. Write SQL queries to find the highest, second-highest, and fourth-highest salary from a table.

asked 1xmediumSQLTechnical2020

Ans. Use descending ordering with LIMIT and OFFSET, or better, use DENSE_RANK over salaries in descending order and select ranks 1, 2, and 4. DENSE_RANK handles duplicate salaries correctly by ranking distinct salary values. The database uses sorting or an index; complexity is typically O(n log n), or faster with a suitable salary index.

Q. How would you scale an application when moving from a 2-tier architecture to a 3-tier architecture?

asked 1xmediumScalabilityTechnical2020

Ans. I would split the system into presentation, application, and data tiers, then scale each independently. Put a load balancer in front of multiple stateless application servers, move business logic out of the web tier, add caching where useful, and scale the database with read replicas, indexing, and partitioning if needed.

Q. Find the median of two sorted arrays

asked 1xhardArraysTechnical2023

Ans. Use binary search on the smaller array to find a partition where the left halves of both arrays contain half the total elements and every left value is less than or equal to every right value. The median is then the max of left values, or the average of max left and min right. Time is O(log min(m,n))).

Q. A test lasts 15 minutes. Using one 7-minute and one 11-minute hourglass, and turning them only 3 times in total, how can you measure exactly 15 minutes?

asked 1xhardLogical reasoningTechnical2020

Ans. Assuming starting both together counts as the first turn, turn both hourglasses over when the test starts. After 7 minutes, turn the 7-minute glass. After 11 minutes, turn the 7-minute glass again. It has run for 4 minutes, so 4 minutes of sand are below. Turning it gives 4 minutes more, ending at 15.

Q. Detect a cycle in a linked list

asked 1xeasyLinked listsTechnical2023

Ans. Use Floyd’s tortoise and hare algorithm: keep two pointers, one moving one node at a time and the other moving two nodes at a time. If they ever meet, there is a cycle. If the fast pointer reaches null, there is no cycle. It uses constant extra space and runs in O(n) time.

Q. Describe a failure you have faced and explain how you dealt with it.

asked 1xunknownConflict resolutionHR2020

Ans. Choose a real work failure with clear stakes, not a disaster caused by carelessness. Emphasise ownership, what you did immediately to limit impact, how you communicated, and what changed afterwards. Interviewers listen for self-awareness, accountability, resilience, sound judgement under pressure, and evidence that you learnt rather than blamed others.

Q. Describe an incident where you faced obstacles or challenges and how you overcame them.

asked 1xunknownProblem solvingTechnical2020

Ans. Choose a real work situation with a clear obstacle, high stakes, and a positive result. Emphasise what you personally did, how you stayed calm, used help or data, adjusted the plan, and followed through. Interviewers listen for resilience, ownership, practical judgement, communication, and learning rather than blame or drama.

Showing 60 of 145 questions. Ranked by how often the same question came back across interviews.

Practise a BlackRock-style interview

A spoken interview built from these questions, scored when you finish; the feedback is yours.

Start practising

When you are ready, record The One: a single interview hiring teams watch, so you stop repeating first rounds.

Common questions

What questions does BlackRock ask?

Candidate interviews most often cover CS fundamentals (54%) and DSA (29%).

How many rounds does BlackRock interview have?

Candidate interviews show an average of 3.1 rounds per experience, with a typical sequence of Online test → Technical → HR. Individual interview paths can vary.

Is the BlackRock interview hard?

Among questions with a recorded difficulty, the mix is easy 48%, medium 49%, hard 3%.