Note: This content has been reviewed and formatted using ChatGPT to correct grammatical issues and improve clarity.
I received a call in the first week of April. The recruiter inquired about my background, experience, and salary expectations. I was asked to share five available dates for interviews, with a maximum of two weeks' preparation time. However, the actual interviews were scheduled for later dates than initially discussed. Each round was set for 45 minutes.
Timezone: US
Problem: A MEX-like problem involving sequence numbers (long long int) and an initial sequence number x. Two types of queries were involved:
ySolution:
I used a HashSet to store the incoming sequence numbers and a variable to track the current missing sequence. With each insertion, the tracker increments until it hits the next missing value. For query type 2, we return this number. I also discussed time complexity in detail.
Follow-up Questions:
Why not trigger the increment in the "get minimum" call?
I explained that placing the increment depends on the query pattern. If query type-2 is less frequent, it’s more efficient to place it during the insertion step.
Real-world application and the role of the initial sequence number?
I related it to a video loading use case, where the initial sequence number represents the starting frame. Missing frames indicate a need for retransmission.
How to detect unprocessed (corrupted) frames?
By inserting each received frame into a HashSet and removing it upon processing.
How to distinguish between corrupted and unprocessed frames?
Through timestamp-based invalidation.
Timeline:
Result: Advanced to next rounds — 3 Technical + 1 Googleyness & Leadership (G&L)
Timezone: India
Problem: An array (garland) contains d diamonds and r rubies (both even). You are allowed up to 2 cuts to divide it into two parts such that both parts contain the same number of diamonds and rubies.
Approach:
n/2.Follow-up:
Timeline:
Timezone: India
Problem: In an undirected graph where nodes represent homes, two persons (nodes a and b) must reach a destination node c. They may travel independently or meet up on the way and then travel together. Joint travel on an edge counts as a single unit of cost.
Approach:
Precomputed all shortest paths between node pairs. For each node, considered it as a meeting point for a and b, then both travel together to c. Computed the minimum total cost.
Time Complexity: O(n²)
Follow-up:
Timeline:
Timezone: Australia
Problem 1: Remove a node with a given value from a linked list
Response: Implemented quickly
Problem 2: Create an n × m maze such that there is exactly one valid path between every two cells.
Initial Idea:
Start from cell (1,1), go straight if possible, else turn left—creates a spiral path. Explained this for ~10 mins before self-correcting.
Final Idea:
A simpler method—draw all horizontal lines, but skip one column per row to maintain a unique path between all cells.
Timeline:
Timezone: US
Note: This was supposed to be a G&L round, but the interviewer decided to conduct a technical interview.
Problem: Inside an n × m rectangle with a set of horizontal and vertical lines, find how many squares can be formed.
Approach:
Used preprocessing to store the maximum length of consecutive horizontal/vertical lines ending at each point. For each potential square, checked if it could be formed using these precomputed values.
Timeline:
Rejected. The recruiter shared that the last two rounds received negative feedback. Surprisingly, during the final interview, the interviewer actively followed my approach, asked relevant questions, and signaled understanding throughout the session. The rejection note cited that the interviewer was “not able to understand the solution,” which was inconsistent with the actual interaction.