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

SDE - 1

Grab
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I kept practicing DSA and CS fundamentals from the 3rd year of Engineering. Along with it, I was also learning web development and I made some good projects. Amazon was the first company that visited our campus. I left no stone unturned, went through the previous interview experiences, polished my skills and eventually cracked the very first interview that I sat down for in my life.
Application story
This company visited our campus for hiring their only i applied for the same it has many round starting with online assessment at the starting.
Why selected/rejected for the role?
i was rejected because i do not able to give a concise and good solution for the question being asked to me .
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Mention some good projects on resume
Tip 2 : Be confident
Tip 3 : Good with computer science basics and ds and algo

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

Tip 1 : Good Projects
Tip 2 : Having some achievements is plus point

Interview rounds

01
Round
Medium
Video Call
Duration60 mins
Interview date14 Feb 2023
Coding problem2

1. Anagram Pairs

Moderate
30m average time
60% success
0/80
Asked in companies
NearbuyAppleAmerican Express

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. Next Greater Number

Moderate
15m average time
90% success
0/80
Asked in companies
Morgan StanleySamsungArcesium

You are given a string S which represents a number. You have to find the smallest number strictly greater than the given number which contains the same set of digits as of the original number i.e the frequency of each digit from 0 to 9 should be exactly the same as in the original number.

For example:
If the given string is 56789, then the next greater number is 56798. Note that although 56790 is also greater than the given number it contains 1 '0' which is not in the original number and also it does not contain the digit '8'.

Note:

The given string is non-empty.

If the answer does not exist, then return -1.

The given number does not contain any leading zeros.
Problem approach

I have done this question earlier so just use already built algorithm which traverses the number from the back.

Try solving now
02
Round
Easy
Video Call
Duration60 mins
Interview date14 Feb 2023
Coding problem2

1. Leftmost and rightmost nodes in a binary tree

Easy
20m average time
80% success
0/40
Asked in companies
SAP LabsGrabDisney + Hotstar

You are given an arbitrary binary tree with N nodes, whose nodes have their values in the range of integers. You have to print the values of leftmost and rightmost nodes at each level of the given tree. In other words, for every level in the given tree, print the values of corner nodes.

Two nodes are said to be at the same level if they are at the same distance from the root node.

Note:

1. For all such levels where there is only one corner node the leftmost and the rightmost nodes are the same.
2. In the output, you have to print the leftmost and rightmost values in level order fashion i.e, the leftmost node of level1 followed by the rightmost node of level1 followed by the leftmost node of level2 followed by the rightmost node of level2 and so on.
Problem approach

Given a Binary Tree, Print the corner nodes at each level. The node at the leftmost and the node at the rightmost.

Try solving now

2. Reverse Stack Using Recursion

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

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

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
2 rounds | 4 problems
Interviewed by Grab
851 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Grab
1056 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Grab
603 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Grab
567 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57824 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes