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 have done my BTech during my studies I started doing the coding questions and participating in the interview mocks.Till then i have done a numbers of questions in all the practicing websites.
Application story
This is an on-campus opportunity for me company visited to my campus for the placement. They have given a CGPA-wise cutoff also
Why selected/rejected for the role?
I was rejected because i was not able to provide the accurate solution for the question given to me.
Preparation
Duration: 3 months
Topics: Data Structures and Algorithms, Object-Oriented Programming System, Operating system, Database Management System
Tip
Tip

Try to do Data Structures and Algorithms based questions and firstly attempt it yourself before going to the solution, also try to do it as quickly as you can. Also prepare for theory subjects like Operating system, Database Management System, etc which I prepared through Coding Ninjas subjective notes and they are very accurate and up to mark

Application process
Where: Campus
Eligibility: Above 7 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
Easy
Video Call
Duration45 mins
Interview date19 Jan 2023
Coding problem2

1. Maximum In All Sub-Arrays Of Size K

Easy
10m average time
90% success
0/40
Asked in companies
DirectiCIS - Cyber InfrastructureSamsung

Given an array/list ‘ARR’ of integers and an integer ‘K’. You are supposed to return the maximum for every subarray of the given array of length ‘K’.

Note :
An array ‘B’ is a subarray of an array ‘A’ if ‘B’ that can be obtained by deletion of, several elements(possibly none) from the start of ‘A’ and several elements(possibly none) from the end of ‘A’. 
Problem approach

To find the maximum element in an array, you can start by setting a variable to the first element in the array. Then, go through the remaining elements one by one and compare each element to the variable holding the maximum value. If you encounter an element that is greater than the maximum value, update the variable to hold the new maximum value. After checking all elements in the array, return the variable holding the maximum value as the result.

Try solving now

2. Check If The String Is A Palindrome

Easy
10m average time
90% success
0/40
Asked in companies
SprinklrCIS - Cyber InfrastructureSamsung

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols and whitespaces.

Note :

String 'S' is NOT case sensitive.

Example :

Let S = “c1 O$d@eeD o1c”.
If we ignore the special characters, whitespaces and convert all uppercase letters to lowercase, we get S = “c1odeedo1c”, which is a palindrome. Hence, the given string is also a palindrome.
Problem approach

To check if a string is a palindrome, you can follow these steps:

Initialize two pointers, one pointing to the beginning of the string and the other pointing to the end of the string.
While the left pointer is less than the right pointer, compare the characters at the two pointers.
If the characters are not equal, the string is not a palindrome. Return false.
If the characters are equal, move the left pointer to the right and the right pointer to the left.
Repeat steps 2-4 until the left pointer is greater than or equal to the right pointer.
If you have made it to this point, the string is a palindrome. Return true.

Try solving now
02
Round
Medium
Video Call
Duration45 mins
Interview date19 Jan 2023
Coding problem2

1. URL Shortener

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

You have given a URL id – 'N' consisting of only digits. Your task is to generate a short URL for the given URL id.

To generate a short URL, you need to convert the given URL id to 62 base number where digits of the number are:[“0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”] i.e “0” corresponds to 0, “a” corresponds to 10, “Z” corresponds to 61, and “10” corresponds to 62, “11” corresponds to 63, and so on….

Follow Up:
Can you solve this in logarithmic time and space complexity?
Problem approach

Step 1 : Store the original URL in a database and generate a unique identifier for the shortened URL. This identifier can be generated by hashing the original URL or by using an auto-incrementing counter. Store this identifier along with the original URL in the database.
Step 2 : When a user requests the shortened URL, lookup the original URL in the database using the unique identifier and redirect the user to the original URL.

Try solving now

2. Height of Binary Tree

Easy
15m average time
80% success
0/40
Asked in companies
GrabBarclaysAmazon

The height of a tree is equal to the number of nodes on the longest path from the root to a leaf.


You are given an arbitrary binary tree consisting of 'n' nodes where each node is associated with a certain value.


Find out the height of the tree.


Example :
Input: Let the binary tree be:

Output: 2

Explanation: The root node is 3, and the leaf nodes are 1 and 2.

There are two nodes visited when traversing from 3 to 1.
There are two nodes visited when traversing from 3 to 2.

Therefore the height of the binary tree is 2.
Problem approach

The height of a binary tree is the number of edges in the longest path from the root node to a leaf node. Here's an algorithm to calculate the height of a binary tree:

If the root node is None, return 0.
Otherwise, recursively calculate the height of the left and right subtrees of the root node.
Return the maximum height of the left and right subtrees, plus 1 to account for the root node.

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
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
3 rounds | 6 problems
Interviewed by Grab
611 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
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes