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

SDE - 2

Google
upvote
share-icon
4 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
My journey to cracking the Google L4 interview began with mastering the basics of data structures and algorithms. I then focused on advanced topics, practised consistently on coding platforms, and participated in mock interviews. Networking with peers and seeking mentorship played a crucial role in refining my skills and boosting my confidence for the final interview.
Application story
I got a Google recruiter's number from one of my friends and reached out to him directly. He conducted a basic screening, asked about my preparation, and inquired if I needed more time. That's how the interview process started.
Why selected/rejected for the role?
I had a strong grasp of DSA and problem-solving and was quite good in design and other topics like OOP, databases, and OS. Graduating from a Tier-1 college also made a good impression.
Preparation
Duration: 3 months
Topics: DSA, OOPS, Database, Low level design, Basic HLD
Tip
Tip

Tip 1: Always review problems you've already solved.
Tip 2: Focus on quality, not quantity.

Application process
Where: Campus
Eligibility: There were no criteria, but there was a good impression based on the number of coding platforms.
Resume Tip
Resume tip

Tip 1: Include all the keywords from the job description in your resume to increase your chances of getting shortlisted.

Tip 2: Thoroughly explain your projects, ensuring it is clear that you've made valuable contributions to them.

Interview rounds

01
Round
Hard
Video Call
Duration45 minutes
Interview date2 Apr 2024
Coding problem1

1. Unique Paths

Moderate
25m average time
70% success
0/80
Asked in companies
Paytm (One97 Communications Limited)AmazonGoogle

//Warm-up question: 
Given a grid of size (N x N), cells S and T, impassable cells with water,
find if an S->T path exists, assuming we can only move horizontally/vertically.
No coding is required, only explain how you would solve this problem.


// Main Question:
A mouse is trying to get from its starting position S to a target T.
The problem is that there is a sleeping cat C on the grid.
The closer the mouse approaches the cat, the higher the chance of
the cat to wake up. So, the mouse wants to get to T, staying as far
away as possible from the cat C.

Formally, assume again a square grid of size (N x N), allowing only
horizontal and vertical moves, impassable cells with water,
and cells S, T, and C. We want to find a path from S to T
for which the minimal distance to C along the path is maximal.

Problem approach

Step 1: For the first part, I explained the standard DFS solution to him.

Step 2: The interviewer gave the main question, and I immediately jumped into the optimized solution.

Step 3: The solution was a modified Dijkstra algorithm—store the visited nodes in a priority queue (PQ) according to their distance from the cat, then pick the nearest node from the PQ for the next iteration.

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date5 Apr 2024
Coding problem1

1. Product of the Last K Numbers

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

Given a sequence of queries of insertion and getProduct, you need to create an array using queries of type-0 and answer queries of type-1.

In each query, the input is of two types :

0 X: insert element ‘X’ at the end array.

1 K: find the product of the last 'K' elements in the array

Note:

For the query of type 1, you can assume that the array has at least k values. And at any time, the product of any contiguous sequence of numbers will fit into a single 32-bit integer without overflowing.
Problem approach

Step 1: Asked for all clarifications for the initial question.

Step 2: Explained the approach and coded the solution using a queue.

Step 3: The interviewer asked a follow-up question.

Step 4: Changed the solution to use an array instead of a queue, explained the changes, and coded the solution. The interviewer was satisfied.

Try solving now
03
Round
Hard
Video Call
Duration45 minutes
Interview date11 Apr 2024
Coding problem1

1. Jump Game

Moderate
25m average time
75% success
0/80
Asked in companies
OracleUberTata 1mg

There is an array 'JUMP' of size 'N' which is 1-indexed and you are currently at index 1. Your goal is to reach index 'N' (end).


When you are at index 'i', you can jump a maximum length of 'JUMP[i]' which means you can make a jump of size 1 to JUMP[i]. Return true if you can reach the end otherwise false.


Example:-
N = 5
JUMP = [1,2,3,4,5]

ANSWER:- The answer should be YES as you can jump from 1st index to 2nd index, from 2nd index to 4th index, and from 4th index to 5th index.
Problem approach

Step 1: Initially stuck in the solution but later came up with the right solution.
Step 2: Started from the end of the array, travelled left till a bigger element was found, added it to the answer and repeated the same thing.
Step 3: The interviewer was extremely happy and satisfied.

Try solving now
04
Round
Medium
HR Round
Duration45 minutes
Interview date3 May 2024
Coding problem1

It was a standard Googlyness and leadership round and standard questions were asked which are listed down.

1. HR Questions

  1. Tell me about yourself.
  2. Tell me about a challenging project you worked on and how you handled it.
  3. Two features of any Google product you use you like most and what improvement you would want to make.
  4. The time when you had a conflicting situation and how you handled it.
  5. The time when you agreed with the manager even though he was wrong.


In the end, I asked a few questions about company and culture.

Problem approach

Tip 1: The first three questions will be asked for sure, prepare beforehand.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which SQL clause is used to specify the conditions in a query?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Google
3541 views
1 comments
0 upvotes
company logo
SDE - 2
1 rounds | 1 problems
Interviewed by Google
9218 views
0 comments
0 upvotes
company logo
7 rounds | 16 problems
Interviewed by Google
4565 views
0 comments
0 upvotes
company logo
SDE - 2
2 rounds | 2 problems
Interviewed by Google
134 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29182 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6536 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5024 views
0 comments
0 upvotes