I was fortunate to have the opportunity to interview with Google through on-campus application. The interview process involved an initial online assessment consisting of two Data Structures and Algorithms (DSA) problems. Once I was shortlisted, I proceeded to three back-to-back technical interview rounds.
Total 30 students were shortlisted for Interview rounds
Round 1: DSA (45 Minutes)
During this round, I was asked a question on graph which was supposed to be solved using bfs . I started my approach using bfs and explained my algorithm to the interviewer for the first 15 mins. And then i started coding my solution within 20 mins . While dry running some edge cases were stuck and later did some modifications which passed that edge case too.
The problem asked was similar to: -
Q1:- You were given a class of Flight its attributes were source , arrival_time , destination , departure_time.
Given input as source and destination you have to return the shortest path from source and destination (if possible) before the given deadline.
After that i was given a follow up same question and coded the same and then discussed the time and space complexities as well.
This round feedback was good .
Round 2: DSA (60 Minutes)
This round consisted of one problems. I knew the DSA solution suitable for this, but finding a holistic approach was challenging. I kept improving my solution for 30 minutes while having discussions with my interviewer. Although I made a few mistakes while writing the code due to time pressure, I completed the brute force solution successfully in the end covering the edge cases and discussed the time and space complexities.
The problem asked was similar to :-
Q1:- Given a tree T having positive edge weights, and k leaves (nodes which have exactly one connected node), I need to delete some edges in the tree so that no two leaves in the original tree are connected (by a path) in the newly formed forest (of trees). The total sum of the weights of the deleted edges needs to be minimized.
After that, In the Last 15 mins ,I was asked some Googlyeness and Leadership questions :-
Q1. How will you manage the team and help them as a leader?
Q2. How do you manage any social events in college?
After that the interviewer greeted me ,and the interview ended
This round went average for me.( I didn't came up with optimised solution)
Round 3: DSA (60 Minutes)
This was the best round of all three. I was asked a question based on a DP, I was able to code the recursive function in 15-20 mins, and later memoized it as well.
The problem asked was similar to :-
Q1:- Given a ship with inital fuel capacity K and a distance vector of N size where distance[i] denotes the distance covered on that day if ship travels and an integer H which denotes exactly H holidays.If ship travels K reduces by 1 if ship is in rest K increases by 1.
Return the maximum distance covered after N days using H holidays.
After that I was given 3 follow up questions which gradually led it to 3D-DP problem from 2D-DP .
What helped me the most during the interviews was having a structured approach to problem-solving. I had identified my weaknesses during preparation and had become comfortable with those topics while focusing on my strengths to maintain my momentum.
After that, In the Last 15 mins ,I was asked some Googlyeness and Leadership questions :-
Q1. How will you react if you were not given the credits of your work at a company?
Q2. When did you took a stand as a leader in your college?
Make sure ,that the answer which you respond to should not be too ideal. Just answer what you feel is the most suitable for you. If you contradict your own thoughts they will caught you off-guard.
Verdict:-Total of 8 students were selected including ME :)