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

SDE - 1

RedBus
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I was not exceptionally good at coding at the start then I solved more than 400+ questions on code studio. Now I can crack most of the interviews I give.
Application story
Company organize a nation wide test for the selection i have applied on the company website for the same
Why selected/rejected for the role?
I was rejected because i do not have good projects in my resume and do not have that much good knowledge of the Data structure and Algorithm.
Preparation
Duration: 4 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more

Interview rounds

01
Round
Medium
Video Call
Duration60 Minutes
Interview date6 Oct 2022
Coding problem2

1. Triplets in Binary Tree

Easy
15m average time
85% success
0/40
Asked in companies
AdobeAmazonRedBus

You have been given a Binary Tree of integers and an integer 'X'. Find all the triplets in the tree whose sum is strictly greater than 'X'. The nodes in the triplet must hold the relationship of grandparent-parent-child.

For example:
For the given binary tree and X = 9

alt text

{1, 3, 6} is a valid triplet because 6 is a node whose parent is 3 and grand-parent is 1. Also, the sum of these nodes is 1 + 3 + 6 = 10 which is strictly greater than X = 9.
Problem approach

I thought of recursive preorder traversal and then tried storing elements in a stack but could not solve this question. Then the interviewer moved to the next question.

Try solving now

2. House Robber

Moderate
26m average time
0/80
Asked in companies
OptumWalmartExpedia Group

A thief wants to loot houses. He knows the amount of money in each house. He cannot loot two consecutive houses. Find the maximum amount of money he can loot.

Try solving now
02
Round
Easy
Video Call
Duration60 Minutes
Interview date6 Oct 2022
Coding problem2

1. Anagram Pairs

Moderate
30m average time
60% success
0/80
Asked in companies
AppleAmerican ExpressIBM

You are given two strings 'str1' and 'str1'.


You have to tell whether these strings form an anagram pair or not.


The strings form an anagram pair if the letters of one string can be rearranged to form another string.

Pre-requisites:

Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams. 

Other examples include:

'triangle' and 'integral'
'listen' and 'silent'
Note:
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct. 
Problem approach

I simply used hashing to solve this problem by checking the frequency of characters in both strings.

Try solving now

2. Reverse Stack Using Recursion

Easy
21m average time
80% success
0/40
Asked in companies
LinkedInNoBrokerAmazon

Reverse a given stack of 'N' integers using recursion. You are required to make changes in the input parameter itself.


Note: You are not allowed to use any extra space other than the internal stack space used due to recursion.


Example:
Input: [1,2,3,4,5] 
Output: [5,4,3,2,1]

add image

Problem approach

I told him proper algorithm with code on paper to the interviewer. He asked me to dry run the algorithm which I did by taking an example of stack.

Try solving now
03
Round
Easy
Video Call
Duration60 Minutes
Interview date6 Oct 2022
Coding problem2

1. Level Order Traversal

Easy
15m average time
85% success
0/40
Asked in companies
FacebookMcAfeeOYO

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

For example:
For the given binary tree

Example

The level order traversal will be {1,2,3,4,5,6,7}.
Try solving now

2. Kth ancestor of a node in binary tree

Hard
50m average time
35% success
0/120
Asked in companies
AmazonHCL TechnologiesHCL Technologies

You are given an arbitrary binary tree consisting of N nodes numbered from 1 to N, an integer 'K', and a node 'TARGET_NODE_VAL' from the tree. You need to find the Kth ancestor of the node 'TARGET_NODE_VAL'. If there is no such ancestor, then print -1.

The Kth ancestor of a node in a binary tree is the Kth node in the path going up from the given node to the root of the tree. Refer to sample test cases for further explanation.

Note:
1. The given node 'TARGET_NODE_VAL' is always present in the tree.
2. The value of each node in the tree is unique.
3. Notice that the Kth ancestor node if present will always be unique.
Problem approach

I solved this question recursively.
Step 1: Find the given node in the tree.
Step 2: If node not found then simply return null, else check if K is greater than 0, if yes that means we haven't found the Kth ancestor, so we decrement the value of K.
Also we check if K value is 0 then we have found Kth ancestor, and we print it and return null and with base case if root == null, we return.

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

What is the purpose of the return keyword?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by RedBus
1510 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by RedBus
918 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 10 problems
Interviewed by RedBus
860 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by RedBus
662 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114869 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58031 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35057 views
7 comments
0 upvotes