Blackrock interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Blackrock
upvote
share-icon
4 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice Atleast 250 Questions
Tip 2 : Ex- Do atleast 2 projects

Application process
Where: Campus
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 Minutes
Interview date11 Aug 2021
Coding problem3

1. Generate all parenthesis

Moderate
30m average time
85% success
0/80
Asked in companies
FacebookExpedia GroupLinkedIn

You are given an integer 'N', your task is to generate all combinations of well-formed parenthesis having ‘N’ pairs.


A parenthesis is called well-formed if it is balanced i.e. each left parenthesis has a matching right parenthesis and the matched pairs are well nested.


For Example:

For ‘N’ = 3,
All possible combinations are: 
((()))
(()())
(())()
()(())
()()()
Try solving now

2. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
IntuitOptumOYO

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Problem approach

If we are allowed to buy and sell only once, then we can use the following algorithm. Maximum difference between two elements. Here we are allowed to buy and sell multiple times. 
Following is the algorithm for this problem. 

Find the local minima and store it as starting index. If not exists, return.
Find the local maxima. And store it as an ending index. If we reach the end, set the end as the ending index.
Update the solution (Increment count of buy-sell pairs)
Repeat the above steps if the end is not reached.

Try solving now

3. Generate Binary Numbers

Easy
10m average time
90% success
0/40
Asked in companies
OraclePayUAmazon

Your friend Ninja has been learning about binary numbers lately. In order to understand binary numbers with perfection, Ninja asks you to generate a list of binary numbers from 1 to ‘N’, which he can use later for reference.

For every integer Ninja gives, your task is to generate all the binary numbers from 1 to ‘N’.

Example:

Consider N = 5,
All the binary numbers from 1 to 5 are: 1, 10, 11, 100, 101.
Problem approach

1) Create an empty queue of strings 
2) Enqueue the first binary number "1" to queue. 
3) Now run a loop for generating and printing n binary numbers. 
a) Dequeue and Print the front of queue. 
b) Append "0" at the end of front item and enqueue it. 
c) Append "1" at the end of front item and enqueue it.

Try solving now
02
Round
Easy
Video Call
Duration30 minutes
Interview date12 Aug 2021
Coding problem2

1. Subtree of Another Tree

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftFacebookAmazon

Given two binary trees T and S, check whether tree S has exactly the same structure and node values with a subtree of T, i.e., check if tree S is a subtree of the tree T.

A subtree of a tree T is a tree S consisting of a node in T and all of its descendants in T. The subtree corresponding to the root node is the entire tree; the subtree corresponding to any other node is called a proper subtree.

Problem approach

Traverse the tree T in preorder fashion. For every visited node in the traversal, see if the subtree rooted with this node is identical to S.

Try solving now

2. Digits Decoding

Moderate
25m average time
70% success
0/80
Asked in companies
FacebookAdobeOYO

A few days back, Ninja encountered a string containing characters from ‘A’ to ‘Z’ which indicated a secret message. For security purposes he encoded each character of the string to its numeric value, that is, A = 1, B = 2, C = 3, till Z = 26 and combined them as a single sequence (SEQ) of digits of length N. Let's say the message was "LA", Ninja encoded it as 121 for L=12 and A=1.

Today, when he read the encoded secret message, he realised that he was not able to decode the original string. So, the Ninja is wondering in how many ways he can decode the numeric sequence to some valid string.

A valid string is a string with characters from A to Z and no other characters.

Example:
Let the encoded sequence be 121,

The first way to decode 121 is:
1 = A
2 = B
1 = A
Thus, the decoded string will be ABA.

The second way to decode 121 is:
12 = L
1 = A
Thus, the decoded string will be LA.

The third way to decode 121 is:
1 = A
21 = U
Thus, the decoded string will be AU.

So, there will be 3 ways to decode the sequence 121 i.e. [(ABA), (LA), (AU)].
Note:
The input sequence will always have at least 1 possible way to decode.    

As the answer can be large, return your answer modulo 10^9  + 7.
Follow Up:
Can you solve this using constant extra space?
Problem approach

This problem is recursive and can be broken into sub-problems. We start from the end of the given digit sequence. We initialize the total count of decodings as 0. We recur for two subproblems. 
1) If the last digit is non-zero, recur for the remaining (n-1) digits and add the result to the total count. 
2) If the last two digits form a valid character (or smaller than 27), recur for remaining (n-2) digits and add the result to the total count.

Try solving now
03
Round
Easy
Video Call
Duration30 Minutes
Interview date12 Aug 2021
Coding problem3

Project discussion and OS & DBMS concept related questions.

1. Technical Questions

Tell me about your project?
Questions related to the project made .example : Nodejs,HTML,CSS etc.

2. OS Questions

Management System
Process Vs Threads

3. DBMS Questions

ACID properties.
SQL questions on queries.

04
Round
Easy
HR Round
Duration10 minutes
Interview date12 Aug 2021
Coding problem1

1. Basic HR Questions

Introduction
Projects
Where do you see yourself after 5 years .

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 2 problems
Interviewed by Blackrock
1036 views
0 comments
0 upvotes
SDE - 1
4 rounds | 5 problems
Interviewed by Blackrock
2104 views
0 comments
0 upvotes
SDE - 1
3 rounds | 3 problems
Interviewed by Blackrock
1507 views
0 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by Blackrock
1181 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6261 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2159 views
0 comments
0 upvotes