Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Grofers interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

Grofers
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Recursion,Tress of different types, DP, Graphs,array and pointer.
Tip
Tip

Tip 1 : Prepare Data structure and algorithm
Tip 2 : RDBMS and OS are also important
Tip 3 : Focus on CAO

Application process
Where: Referral
Eligibility: Above 6 CGPA
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Always write things which you can explain there

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 mintues
Interview date19 Nov 2020
Coding problem2

Nice environment everything went good.

1. Sum of LCM

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

You are given an integer ‘N’ , calculate and print the sum of :

LCM(1,N) + LCM(2,N) + .. + LCM(N,N) 

where LCM(i,n) denotes the Least Common Multiple of the integers ‘i’ and ‘N’.

Try solving now

2. Vertical Order Traversal

Moderate
35m average time
65% success
0/80
Asked in companies
MakeMyTripAppleSalesforce

Given a binary tree, return the vertical order traversal of the values of the nodes of the given tree.

For each node at position (X, Y), (X-1, Y-1) will be its left child position while (X+1, Y-1) will be the right child position.

Running a vertical line from X = -infinity to X = +infinity, now whenever this vertical line touches some nodes, we need to add those values of the nodes in order starting from top to bottom with the decreasing ‘Y’ coordinates.

Note:
If two nodes have the same position, then the value of the node that is added first will be the value that is on the left side.
For example:
For the binary tree in the image below.

alt text

The vertical order traversal will be {2, 7, 5, 2, 6, 5, 11, 4, 9}.
Try solving now
02
Round
Hard
Video Call
Duration90 minutes
Interview date20 Nov 2020
Coding problem2

It was a tough round focus on the key concepts

1. Technical Questions

Derive merge sort complexity.

Different methods to obtain fibonacci series , Space complexity of fibonacci recursion.

2. Design a stack that supports getMin() in O(1) time and O(1) extra space

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

Create a stack data structure that allows operations such as push (adding an element), pop (removing the top element), top (retrieving the top element), and also provides a way to retrieve the minimum element in constant time.


Implement the following public functions :

1. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.

2. pop() :
It pops the element from the top of the stack and returns nothing.

3. top() :
It returns the element being kept at the top of the stack.

4.  getMin() :
It returns the smallest element present in the stack.
Operations Performed on the Stack:
Query-1(Denoted by an integer 1): Pushes integer data to the stack. (push function)

Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack. (pop function)

Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack. (top function)

Query-4(Denoted by an integer 4): Returns the smallest element present in the stack. (getMin() function)
Try solving now
Start a Discussion
Similar interview experiences
company logo
SDE - Intern
3 rounds | 4 problems
Interviewed by Grofers
978 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Grofers
1080 views
0 comments
0 upvotes
company logo
Data Analyst
4 rounds | 8 problems
Interviewed by Grofers
459 views
0 comments
0 upvotes
Product Engineer
3 rounds | 5 problems
Interviewed by Squadstack
1505 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
13394 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
12443 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
8937 views
2 comments
0 upvotes