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

MTS 1

BYJUS
upvote
share-icon
3 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data structures, oops, dbms, os, low level system design, DP, graphs , tries
Tip
Tip

Tip 1 : Practice DSA sheets
Tip 2 : focus on core subjects
Tip 3 : don’t forget do practise LLD

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

Tip 1 : Have some full stack projects 
Tip 2 : put some intern on resume

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 Minutes
Interview date11 Aug 2022
Coding problem2

it was a coding round, it was in the evening, I gave the coding test in the main audi of our college , in the test there were 2 coding questions and rest were mcq on os, dbms, cn and oops

1. Find power of a number

Easy
15m average time
80% success
0/40
Asked in companies
AmazonQuikrPayPal

Ninja is sitting in an examination hall. He is encountered with a problem statement, "Find ‘X’ to the power ‘N’ (i.e. ‘X’ ^ ‘N’). Where ‘X’ and ‘N’ are two integers."

Ninja was not prepared for this question at all, as this question was unexpected in the exam.

He is asking for your help to solve this problem. Help Ninja to find the answer to the problem.

Note :

For this question, you can assume that 0 raised to the power of 0 is 1.
Try solving now

2. X OR Y

Easy
15m average time
80% success
0/40
Asked in companies
CitrixBYJUS

Given a number X. Find a positive number Y required to make binary representation of (X+Y) palindrome.


Also Y should be such that most significant set bit of (X+Y) should be same as the most significant set bit of X.

Try solving now
02
Round
Medium
Face to Face
Duration45 Minutes
Interview date12 Aug 2022
Coding problem3

interview round

1. Technical Question

How google predicts word when we type something

Hard
20m average time
80% success
0/120
Asked in companies
Goldman SachsUberApple

You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return the list of these nodes.


Distance between two nodes in a binary tree is defined as the number of connections/edges in the path between the two nodes.


Note:

1. A binary tree is a tree in which each node has at most two children. 
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.
Example :

Sample Output 2 explanation

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.
Problem approach

Create a map to store the parent of each node in the tree, Traverse the tree recursively (via depth-first search), at each step if the current node is not NULL. Store its parent in the map, then traverse the left and right subtree.
Now assume that the given node is the root of the tree. In such a case, we can simply run a breadth-first search from the root, and track the current level of the tree. When the level = ‘K’, then the current nodes in the queue will be our answer.
But the problem is if the target node is not the root, then we can’t travel to every node with only left and right pointers. So here the stored parents will help us.
Observe that in a binary tree a node can be connected to maximum 3 other nodes ie. left child, right child, and the parent. We have left and right pointers, and we have also stored the parent node.
Now simply start BFS from the target node, and for each node which is at front of the queue, push its left child, right child and parent node(provided they are not null).
When the level of BFS reaches ‘K’, break the BFS and store all the values of nodes in the queue to an array and return it.

Try solving now

3. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
HCL TechnologiesCiti BankAtlassian

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Try solving now
03
Round
Medium
Face to Face
Duration45 minutes
Interview date12 Aug 2022
Coding problem3

interview

1. OS Question

What is virtual memory

2. DBMS Question

What is Indexing and why is it done

3. Min Cost To Buy N Items

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

Ninja Yuki is in the mood of shopping ninja blades today, and why should he not be, its finally the time for the Spring Fair in his Village. Initially, he has 0 number of blades and aims to buy ‘N’ of them from the fair. But the blade shopkeeper being a cunning man himself, presents a weird way of pricing the number of ninja blades Yuki can buy.

Suppose at any instance Yuki has ‘K’ number of blades, then:

1) Yuki can buy 1 more blade with cost 'A.’ He now has ‘K+1’ Ninja blades.
2) Yuki could buy a ‘K’ number of blades with cost 'B.’ He now has ‘2*K’ blades.
where 'A' and 'B' are predefined and constant.

Yuki does not want to get robbed in the fair. Being his nerd friend can you tell him the minimum price he needs to pay to buy exactly ‘N’ ninja blades, considering he has 0 blades initially?

Note:

There can be two or more ways with the exact cost. You can consider any one of them, but the overall cost to reach from 0 to 'N' must be minimized.

For example:

Consider Yuki need to buy 5 blades, the cost of adding 1 blade is 2, and the cost of doubling the blades is 1 then you have to perform the following operations:
1) Doubling 0 will result in 0 only, so add 1 blade to 0 blades with cost 2. Total cost becomes 2.

2) Next, you can either double 1 to reach 2 or add 1 blade. But since the cost of doubling is less than that of adding, so double 1 with cost 1. Total cost becomes 3.

3) Doubling 2 will result in 4 with a cost of 1. Total becomes 4.

4) Adding 1 in 4 will result in 5 (which is the desired number) with a cost of 2. The total cost to reach 5 becomes 6.
Try solving now

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
MTS 1
3 rounds | 7 problems
Interviewed by BYJUS
639 views
0 comments
0 upvotes
company logo
MTS 1
2 rounds | 4 problems
Interviewed by BYJUS
471 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BYJUS
566 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by BYJUS
602 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
MTS 1
6 rounds | 10 problems
Interviewed by Adobe
4050 views
1 comments
0 upvotes
company logo
MTS 1
4 rounds | 14 problems
Interviewed by Oracle
4097 views
0 comments
0 upvotes
company logo
MTS 1
2 rounds | 5 problems
Interviewed by Adobe
1550 views
1 comments
0 upvotes