BlackRock Interview Questions
104 real interview questions at BlackRock.
Showing 61–90 of 104 questions
1. What are the differences between DDL, DML, and TCL in SQL? 2. How can you find the middle node of a singly linked list in a single pass? 3. How do you design a stack that can return the minimum element at any given time in constant time?
What is linear regression?
How do you detect a cycle in a linked list?
You are given 8 identical-looking balls. Seven of the balls are equal in weight, and one of them is lighter. How would you efficiently find the lighter ball?
Given a set of returns for a portfolio, calculate the variance of the portfolio.
In the context of linear regression, what are the assumptions that should be checked before applying the model?
What are convexity and duration, and what is the difference between them?
Given a binary search tree (BST) and two nodes, find their lowest common ancestor.
Explain the concept of a left inner join.
Write a program to determine if the current configuration of a Tic Tac Toe board allows the 'X' player to win on their next move. A winning configuration is one where three 'X's appear in a row. Your task is to find if there is a row, column, or diagonal with exactly two 'X's and an empty spot, indicating that 'X' can win by playing in that spot. The program should output the coordinate (x, y) of the winning location.
What is the duration of a bond? Explain how it is calculated.
What are duration and convexity?
Explain the mathematical reasoning behind negative convexity.
You have two strings and one lighter. How many minutes does it take for a string to disappear when you light both of its ends?
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.
Want the full solutions?
Get detailed walkthroughs for all 104+ BlackRock questions with Quant Blueprint.
Get Started