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

SDE - Intern

GroMo
upvote
share-icon
3 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Journey
I started my DSA journey in the second year of my graduation. In total, I solved 1000+ DSA questions and participated in contests. However, DSA is not the only path to cracking a company, so I also studied computer fundamentals like OOP, DBMS, OS, and CN. Since most startups focus on development, I made some web development projects based on the MERN stack.
Application story
I applied through campus recruitment and completed an online assessment with several data structures and algorithms (DSA) questions, which I managed to solve within the allotted time. Following that, I was shortlisted for an interview process consisting of three rounds: two technical rounds and one combined technical and HR rounds.
Why selected/rejected for the role?
I was rejected in the second round which was based on DSA + Computer Fundamentals. In which I was unable to solve a question on Operating System.
Preparation
Duration: 20 months
Topics: Data Structure, OOP, DBMS, Computer Networks, Operating System, ReactJS, MongoDB, NodeJS, SQL
Tip
Tip

Tip 1: Be consistent in solving DSA questions daily (aim for 500).
Tip 2: Try to solve a problem before jumping to the solution.
Tip 3: To learn development, don’t just watch tutorials—build as many projects as you can.

Application process
Where: Campus
Eligibility: 7 CGPA, (Salary Package - 17 LPA)
Resume Tip
Resume tip

Tip 1: Highlight basic achievements in DSA.
Tip 2: Ensure a strong understanding of computer fundamentals.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date17 Oct 2023
Coding problem3

They first shortlist the students before giving the OA. Then there were 3 DSA questions. The camera and mic were on.

1. Next Permutation

Moderate
15m average time
85% success
0/80
Asked in companies
OraclePharmEasyMeesho

You have been given a permutation of ‘N’ integers. A sequence of ‘N’ integers is called a permutation if it contains all integers from 1 to ‘N’ exactly once. Your task is to rearrange the numbers and generate the lexicographically next greater permutation.

To determine which of the two permutations is lexicographically smaller, we compare their first elements of both permutations. If they are equal — compare the second, and so on. If we have two permutations X and Y, then X is lexicographically smaller if X[i] < Y[i], where ‘i’ is the first index in which the permutations X and Y differ.

For example, [2, 1, 3, 4] is lexicographically smaller than [2, 1, 4, 3].

Problem approach

Simply use another vector/array and store the values of nums[nums[i]] in the new vector.

Try solving now

2. Numbers With Same Consecutive Differences

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

You are given two integers, ‘N’ and ‘K’. The task is to return all non-negative integers having ‘N’ digits such that the absolute difference between each consecutive digit is ‘K’.

Example:
Input: N = 2, K = 6
We need to return all two-digit numbers where the absolute difference between each consecutive digit is ‘6’. Note that ‘06’ is not a valid two-digit number. So, the answer is:
Output: [17, 28, 39, 60, 71, 82, 93]
Note:
1. Every number in the answer should not contain leading zeroes. E.g., the number ‘09’ is invalid.

2. You can return the answer in any order.
Problem approach

To find integers with sequential digits in the given range [low, hgh] generate numbers starting from each digit 1-9 appending increasing digits. collect numbers within the range and then sort and return the list.

Try solving now

3. Chocolate Problem

Moderate
15m average time
85% success
0/80
Asked in companies
EcomExpressIBMMicrosoft

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

1. Each student gets at least one packet of chocolate.

2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Example :

Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

subsequence

And chocolates in each packet is : {8, 11, 7, 15, 2}

All possible way to distribute 5 packets of chocolates among 3 students are -

( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’

Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Problem approach

Just assign the cookies starting from the child with less greediness to maximize the number of happy children.

Try solving now
02
Round
Easy
Face to Face
Duration45 minutes
Interview date17 Oct 2023
Coding problem3

2 DSA questions + basic OOPs conceptual questions.

1. Missing Number

Moderate
30m average time
70% success
0/80
Asked in companies
HSBCSterlite Technologies LimitedSamsung

You are given an array/list ‘BINARYNUMS’ that consists of ‘N’ distinct strings which represent all integers from 0 to N in binary representation except one integer. This integer between 0 to ‘N’ whose binary representation is not present in list ‘BINARYNUMS’ is called ‘Missing Integer’.

Your task is to find the binary representation of that ‘Missing Integer’. You should return a string that represents this ‘Missing Integer’ in binary without leading zeros.

Note

1. There will be no leading zeros in any string in the list ‘BINARYNUMS’.

Example:

Consider N = 5 and the list ‘binaryNums’=  [“0”, “01”, “010”, “100”, “101”].  This list consists of the binary representation of numbers [0, 1, 2, 4, 5]. Clearly, the missing number is 3 and its binary representation will be “11”. So you should return string “11”.
Problem approach

First I solved this in a brute force approach, using a hashmap
In the second approach, I sort the array, and then find the missing number
The final and optimized approach is to subtract the array_sum from the sum of 1 to n digits

Try solving now

2. Sum root to leaf

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

You are given an arbitrary binary tree consisting of N nodes where each node is associated with a certain integer value from 1 to 9. Consider each root to leaf path as a number.

For example:

       1
      /  \
     2    3

The root to leaf path 1->2 represents the number 12.
The root to leaf path 1->3 represents the number 13.

Your task is to find the total sum of all the possible root to leaf paths.

In the above example,

The total sum of all the possible root to leaf paths is 12+13 = 25
Note:
The output may be very large, return the answer after taking modulus with (10^9+7).
Problem approach

The basic idea is to subtract the value of the current node from the sum until it reaches a leaf node and the subtraction equals 0, then we know that we got a hit. Otherwise, the subtraction at the end could not be 0.

Try solving now

3. Operating System

What are the different types of Operating Systems? (Learn)

Problem approach

Tip 1: Computer Fundamentals should be on the tip.
Tip 2: They were more focused towards the Operating System.
 

03
Round
Medium
Face to Face
Duration45 minutes
Interview date17 Oct 2023
Coding problem3

2 DSA + 1 Question on ReactJs.

1. Reverse Integer

Easy
20m average time
80% success
0/40
Asked in companies
AppleAdobeFreshworks

You are given a 32-bit signed integer ‘N’. So, the integer will lie in the range [-2^31, 2^31 - 1]. Your task is to return the reverse of the given integer. If reversing causes overflow, then return -1.

Note:

(1) Do not use data types with the capacity of more than 32-bit like ‘long int’ or ‘long long int’ in C++. The problem is meant to reverse the integer using a 32-bit data type only.

(2) You should assume that the environment does not allow storing signed or unsigned 64-bit integers.
Problem approach

First, we declare a variable r and initialize it to 0. Then, each time, find the remainder using the modulus operator and add the remainder to r.

Try solving now

2. Largest rectangle in a histogram

Hard
25m average time
75% success
0/120
Asked in companies
OptumCIS - Cyber InfrastructureFacebook

You have been given an array/list 'HEIGHTS' of length ‘N. 'HEIGHTS' represents the histogram and each element of 'HEIGHTS' represents the height of the histogram bar. Consider that the width of each histogram is 1.

You are supposed to return the area of the largest rectangle possible in the given histogram.

For example :
In the below histogram where array/list elements are {2, 1, 5, 6, 2, 3}.

alt text

The area of largest rectangle possible in the given histogram is 10.
Problem approach

Initialize left_smaller and right_smaller arrays to track previous and next smaller elements. Compute rectangle areas using these indices and update the maximum area found. This approach runs in O(n} time.

Try solving now

3. Operating System

Write a code to implement a thread in the operating system.

Problem approach

Tip 1: Along with theoretical knowledge, you should also have practical knowledge of operating systems.

Tip 2: At least practice basic questions related to operating systems and code them.

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
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
961 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15481 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15339 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes