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

SDE - 1

Google.com
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Journey
I applied off-campus for a Software Graduate role in October and received my interview link around late October. I mainly prepared for DSA. Topics such as Graphs, Trees, and DP were the most important.
Application story
I applied for the role off-campus through the Google Careers portal. About a week after submitting my resume, I was contacted via email by a recruiter who shared a preliminary form to collect additional details regarding my graduation timeline, current location, and technical interests. After I submitted the form, the recruiter reached out again to schedule the initial screening. The entire process—from application to interview scheduling—was well-coordinated via email, with the recruiter providing clear preparation resources and a timeline for the subsequent technical rounds.
Why selected/rejected for the role?
I was rejected, but I gained valuable experience in handling pressure, understanding what questions to expect, and how to approach them.
Preparation
Duration: 2-5 months
Topics: Data Structures, Algorithms, Dynamic Programming, Graph, Trees, Arrays
Tip
Tip

Tip 1: Clarify constraints before coding.

Tip 2: Prioritize trade-off analysis.

Tip 3: Practice DP, graphs, and trees thoroughly, as these are their favourite topics.

Application process
Where: Company Website
Eligibility: No criteria, (Salary Package - 57 LPA)
Resume Tip
Resume tip

Tip 1: Do not include false information on your resume.

Tip 2: Have at least one project that you understand end-to-end.

Interview rounds

01
Round
Easy
Online Coding Test
Duration45 minutes
Interview date4 Nov 2025
Coding problem1

It was a 45-minute interview round where they asked a single question with some variations. It was conducted around 10 AM in the morning.

1. Best Time to Buy and Sell Stock

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

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Problem approach

Case 1: Product Data is Sorted by Timestamp

Approach: Binary Search. Since the data is ordered, I used std::upper_bound (in C++) to find the first element greater than the query timestamp, then moved one step back to get the “latest known price.”

Case 2: Both Product Data and Queries are Sorted

Approach: Two Pointers / Sliding Window. I maintained a pointer for the product array and iterated through the queries. Since both are sorted, the pointer only moves forward, making the lookup extremely efficient.

Case 3: Data is Unsorted

Approach: Pre-processing. I first sorted the product array by timestamp (O(N log N)) and then applied the Binary Search or Two-Pointer method, depending on whether the query vector was also sorted.

Try solving now
02
Round
Easy
Online Coding Test
Duration60 minutes
Interview date4 Nov 2025
Coding problem2

This was conducted on the same day after Round 1. It lasted around 60 minutes, during which they asked two DSA questions and a few behavioral questions.

1. Russian Doll Envelopes

Hard
50m average time
50% success
0/120
Asked in companies
DunzoPayPalHSBC

You are given a set of ‘N’ rectangular envelopes. The height and width of each envelope are given by arrays, ‘height’ and ‘width’ respectively, each consisting of ‘N’ positive integers. The height, width of the ith envelope is given by ‘height[i]’ and ‘width[i]’ respectively.

You can put one envelope inside another envelope if and only if both the height and width of one envelope is strictly greater than the height and width of the other envelope.

What is the maximum number of envelopes you can Russian doll? (put one inside other)

Note
Rotation of envelope is not allowed, that is, height and width can’t be exchanged
Problem approach

Sorting Strategy: I first sorted the envelopes by width in ascending order. For envelopes with the same width, I sorted them by height in descending order. This ensures that when we consider heights, we don’t pick two envelopes with the same width (since one cannot fit into another of equal width).

LIS Optimization: After sorting, the problem reduces to finding the Longest Increasing Subsequence (LIS) of the heights.

Complexity: I used an O(N log N) approach with binary search (std::lower_bound) to find the LIS, instead of the O(N²) DP approach, which was necessary given the constraints.

Try solving now

2. Number Of Sequence

Hard
50m average time
60% success
0/120
Asked in companies
OlaCodenationZoho Corporation

A sequence is called nice by a coding ninja if the following conditions are met:

0 <= ‘ARR’[k] <= k 
‘ARR’[k] = ‘ARR’[m] mod k, for all pairs of k,m such that k divides m.

You are given a sequence of integers ‘ARR’ where some numbers may be -1. Find and print the number of nice sequences you can create by changing each -1 to a non-negative integer. As this number can be quite large, your answer must be modulo it by 10 ^ 9 + 7.

For example:

Given ‘N’ = 3, 
'A' = {0, -1, -1} 
Then the answer is 6 because following sequences are possible:[0, 0, 0], [0, 1, 0], [0, 1, 1], [0, 1, 2], [0, 0, 1], [0, 0, 2].
Problem approach

Graph Construction: I treated this as a Topological Sort problem. Each element in the vectors is a node. For a vector like [1, 2, 3, 4], I added directed edges: 1 -> 2, 2 -> 3, and 3 -> 4.

Kahn’s Algorithm: 1. Calculated the in-degree of every unique number.
2. Added all nodes with in-degree 0 to a std::priority_queue (to maintain a consistent or sorted output if requested, like the 1 2 3 4 5 7 9 example).
3. Repeatedly popped the smallest element, added it to the result, and reduced the in-degree of its neighbours.

Complexity: O(V+E), where V is the number of unique elements and E is the total number of adjacent pairs in the input vectors.

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

Which data structure is used to implement a DFS?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
5027 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
1077 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6697 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3720 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115355 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58428 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35236 views
7 comments
0 upvotes