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 started my coding journey on youtube, where I first learned the data structure and Algorithm. Then, I started my preparation of Data Structure on the LinkedIn.
Application story
I applied through referral. .
Why selected/rejected for the role?
I was rejected because I could not give precise and optimized solutions to the questions asked.
Preparation
Duration: 8 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming,System Design, Link List and Graphs
Tip
Tip

Tip 1 : Practice at least 250 Questions.
Tip 2 : Do at least 2 projects.

Application process
Where: Referral
Eligibility: Above 6 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
Face to Face
Duration90 minutes
Interview date26 Nov 2022
Coding problem2

1. Count Inversions

Moderate
40m average time
55% success
0/80
Asked in companies
GrabCoinbaseOracle

For a given integer array/list 'ARR' of size 'N' containing all distinct values, find the total number of 'Inversions' that may exist.

An inversion is defined for a pair of integers in the array/list when the following two conditions are met.

A pair ('ARR[i]', 'ARR[j]') is said to be an inversion when:

1. 'ARR[i] > 'ARR[j]' 
2. 'i' < 'j'

Where 'i' and 'j' denote the indices ranging from [0, 'N').
Problem approach

This problem is a classic problem known as inversion count. I solved this problem using a merge sort tree and got full points. If we apply brute force, we will get a time limit exceeded error, so we have to solve this in O(n log n) complexity.

Try solving now

2. Maximum Subarray Sum

Moderate
25m average time
75% success
0/80
Asked in companies
CultfitPayPalWalmart

Given an array of numbers, find the maximum sum of any contiguous subarray of the array.


For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would take elements 42, 14, -5, and 86.


Given the array [-5, -1, -8, -9], the maximum sum would be -1.


Follow up: Do this in O(N) time.

Problem approach

This problem is known as Kadane's algorithm. I solved this one using a single for loop and passed all the test cases successfully.

Try solving now
02
Round
Medium
Face to Face
Duration90 minutes
Interview date26 Nov 2022
Coding problem2

1. Merge Sort

Easy
15m average time
85% success
0/40
Asked in companies
Hewlett Packard EnterpriseIBMPhonePe

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm -

Merge sort is a Divide and Conquer based Algorithm. It divides the input array into two-parts, until the size of the input array is not ‘1’. In the return part, it will merge two sorted arrays a return a whole merged sorted array.

subsequence

The above illustrates shows how merge sort works.
Note :
It is compulsory to use the ‘Merge Sort’ algorithm.
Problem approach

Step 1: I wrote the first merge sort algorithm, then I explained the worst-case complexity for it.

Step 2: The interviewer cross-questioned me about the divide and conquer approach.

Step 3: I gave the definition of the divide and conquer method.

Try solving now

2. Delete Node In A Linked List

Easy
15m average time
80% success
0/40
Asked in companies
CIS - Cyber InfrastructureDell TechnologiesSamsung Electronics

You are given a Singly Linked List of integers and a reference to the node to be deleted. Every node of the Linked List has a unique value written on it. Your task is to delete that node from the linked list.

A singly linked list is a linear data structure in which we can traverse only in one direction i.e. from Head to Tail. It consists of several nodes where each node contains some data and a reference to the next node.

Note:

• The reference to the head of the linked list is not given.
• The node to be deleted is not a tail node.
• The value of each node in the Linked List is unique.
• It is guaranteed that the node to be deleted is present in the linked list.

A sample Linked List-

singly_linkedlist

Problem approach

Step 1: I wrote all conditions for deletion in a linked list, first from the beginning of the linked list, then between nodes in the linked list, and finally deleting the last node of the linked list.

Step 2: The interviewer asked about the complexity for each of these cases, and I replied for all three.

Try solving now
03
Round
Medium
Face to Face
Duration90 minutes
Interview date26 Nov 2022
Coding problem2

1. Basic HR Questions

Explain your best project?
Why machine learning project?
What are data frames? (Learn)
Difference between classification and regression. (Learn)

Problem approach

Tip 1 : Do at least two major projects.
Tip 2 : Explain your role in your project what you have done in your project.
Tip 3 : Have good knowledge of the technologies and stacks that are used in the project.

2. 0 1 Knapsack

Moderate
0/80
Asked in companies
AmazonTwitterInnovaccer

A thief is robbing a store and can carry a maximum weight of ‘W’ into his knapsack. There are 'N' items available in the store and the weight and value of each item is known to the thief. Considering the constraints of the maximum weight that a knapsack can carry, you have to find the maximum profit that a thief can generate by stealing items.

Note: The thief is not allowed to break the items.

For example, N = 4, W = 10 and the weights and values of items are weights = [6, 1, 5, 3] and values = [3, 6, 1, 4]. Then the best way to fill the knapsack is to choose items with weight 6, 1 and 3. The total value of knapsack = 3 + 6 + 4 = 13.

Problem approach

DP problem

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
4 rounds | 4 problems
Interviewed by RedBus
1542 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