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

SDE - 2

Grab
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I came to know about this job from their official site. I applied for it and got selected for the exam, and then I took the exam and got selected for the interview.
Application story
I applied for this profile on the company website and got the test link after applying for the jobs.
Why selected/rejected for the role?
I could not answer the optimal approach for a problem, so I was rejected in the interview.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Graph should be on your tips.
Tip 2 : while explaining the solution to interviewer, dont just hop onto the most optimal solution. Start with the brute force one, give the cons of brute force solution, and then go step by step till you reach the optimal solution.
Tip 3 : Improve on your communication skills as well.

Application process
Where: Company Website
Eligibility: Above 6 CGPA
Resume Tip
Resume tip

Tip 1 : Mention only what is required for your profile, for e.g. do not stress too much on your co curricular stuff. Rather, try explaining more of your technical stuff that is relevant for your job.
Tip 2 : keep it limited to 1 page. And make sure its a pdf and not an image.

Interview rounds

01
Round
Medium
Video Call
Duration90 minutes
Interview date16 Nov 2022
Coding problem2

1. Middle Of Linked List

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

Given a singly linked list of 'N' nodes. The objective is to determine the middle node of a singly linked list. However, if the list has an even number of nodes, we return the second middle node.

Note:
1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Try solving now

2. Convert ternary expression to a binary tree.

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

You are given a ternary expression in the form of a string. Your task is to convert this expression into a binary tree.

Note:
1. The string is made up of lowercase English alphabets,  ‘?’ and ‘:’ special characters.

2. The alphabets may be repeated in the string.

3. The expression which uses ‘?:’ is known as ternary expression and the expression will be evaluated as (condition ? value_if_true : value_if_false).
Problem approach

Step 1 : First, we compare the key with the element at mid1. If found equal, we return mid1.
Step 2 : If not, then we compare the key with the element at mid2. If found equal, we return mid2.
Step 3 : If not, then we check whether the key is less than the element at mid1. If yes, then recur to the first part.
Step 4 : If not, then we check whether the key is greater than the element at mid2. If yes, then recur to the third part.
Step 5 : If not, then we recur to the second (middle) part.

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date16 Nov 2022
Coding problem2

1. Check If Binary Tree Is Sum Tree Or Not

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

You are given an arbitrary binary tree consisting of N nodes where each node is associated with a certain value. You need to check whether the given tree is a sum tree or not.

A binary tree is a sum tree if the value of each node is equal to the sum of nodes present in the left and the right subtree. An empty tree is a sum tree with 0 sums. A leaf node is also considered a sum tree with a sum equal to the value of the leaf node.

Try solving now

2. Longest Substring Without Repeating Characters

Moderate
20m average time
80% success
0/80
Asked in companies
Morgan StanleyAmazonWalmart

Given a string 'S' of length 'L', return the length of the longest substring without repeating characters.

Example:

Suppose given input is "abacb", then the length of the longest substring without repeating characters will be 3 ("acb").
Try solving now
03
Round
Easy
Video Call
Duration45 minutes
Interview date16 Nov 2022
Coding problem1

1. Two Sum

Easy
10m average time
90% success
0/40
Asked in companies
Chegg Inc.FacebookAmazon

You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

Note:

We cannot use the element at a given index twice.

Follow Up:

Try to do this problem in O(N) time complexity. 
Problem approach

Hashing Solution
We can store the frequency of every element in the array in a hashmap.
We will loop over every index i, and check the frequency of (Target - ARR[i]) is the hashmap:
If (Target - ARR[i]) is equal to ARR[i], we will check if frequency of ARR[i] . If it is greater than 1 then we will decrease the frequency of ARR[i] by 2 and add a pair (ARR[i] , ARR[i]) to our answer.
Else, if the frequency of ARR[i] and Target - ARR[i] is greater than equal to 1 then we add pair (ARR[i], Target - ARR[i]) to our answer and decrease the frequency of both by 1.
If no valid pairs exist, we will return [[-1,-1]].

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
Software Engineer
2 rounds | 3 problems
Interviewed by Grab
1061 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Grab
881 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 - 2
5 rounds | 12 problems
Interviewed by Walmart
29569 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6677 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5175 views
0 comments
0 upvotes