BlackRock Interview Questions
50 real interview questions for Software Engineer roles at BlackRock.
Showing 31–50 of 50 questions
In Java, how would you create a deck of cards and implement a method to shuffle them?
How do you detect a cycle in a circular linked list?
Answer the following programming questions: 1) Reverse a number. For example, input: 9966, output: 6699. 2) Count occurrences of each word in a string. For example, input: "The lovely lady is looking lovely as all lady look lovely", output: The: 1, lovely: 3, lady: 2, is: 1, looking: 1, as: 1, all: 1, look: 1. 3) Swap two numbers without using a temporary variable. For example, input: a = 10, b = 20; output: a = 20, b = 10.
Implement a solution to find the intersection node of two singly linked lists, starting from a brute-force approach to the most optimal solution. Also, implement the linked list data structure from scratch. Additionally, explain the differences between arrays and linked lists.
Given a singly linked list, find and return the middle node of the list. If there are two middle nodes, return the second middle node.
What is object-oriented programming (OOP)? What is the difference between arrays and lists? How do you reverse an array?
Given a binary search tree (BST) and a target value, find whether the element exists in the BST.
Write a function that returns the median of a list of numbers.
Arrange an array so that all zeros are on one side and all ones are on the other.
Explain the keyword 'static' in the context of Java. What is its purpose and how is it used?
Sort a stack using only one other stack and a single variable.
Given a tree and two specified nodes, find their first common ancestor.
1. Reverse a string in place. 2. Write a method to convert a decimal number to binary. 3. What is the Singleton pattern? 4. What are the differences between Array and ArrayList in Java? 5. If you are going to design a phone directory, what data structure would you use? 6. Calculate Fibonacci numbers with and without recursion. For example, given an array [3, 5, 4], return the 3rd, 5th, and 4th Fibonacci numbers and store them in an array. What is the complexity of your algorithm? 7. Return the length of the last word in a sentence. For example: String s = 'Hello Wang' should return 4; String s2 = 'Hello ' should return 5; String s3 = '' should return 0. 8. Given an input number greater than 9, write a program that repeatedly sums all its digits until the sum is less than 10. For example, given 38: 3+8=11, 1+1=2, stop. 9. What are the differences between String, StringBuilder, and StringBuffer in Java?
Given an array of integers (both positive and negative), find the maximum sum of any consecutive subarray.
How does a HashMap find an entry, and what is the runtime of that search?
Implement a stack data structure that dynamically resizes its storage as elements are pushed and popped.
Write a function that takes in a string and an integer n. The integer determines the maximum number of allowed repeated consecutive letters. For example, ('aab', 1) should return 'ab'. ('aaabba', 2) should return 'aabba'.
Write a method that implements binary search.
How do you convert an expression in infix (or prefix) notation to postfix notation?
Find the least common ancestor of two nodes in an N-ary tree.
Want the full solutions?
Get detailed walkthroughs for all 104+ BlackRock questions with Quant Blueprint.
Get Started