Google India | On-Campus | Aug 22
Anonymous User
1334

College: Tier 2
Role: Software Engineer, University Graduate
Salary Package: Rs 30,36,560 (For B.Tech) & Rs 31,82,948 (For M.Tech)

First Round was OA :
OA Consisted of 2 Questions
One was straight from leetcode 2172. Maximum AND Sum of Array.
The second was one of the questions from This Google Doc.

Got results after 2 weeks, candidates who were able to solve at least 1.5 out of 2 got shortlisted for the interviews.

Interviews:
Google had a prep session for the candidates where they walk through how a typical Interview at google goes like,
There were 3 Rounds [60,45,60]mins
Where 60min Round means 45min DSA + 15min Googliness and 45min is only DSA.
Each round was an elimination round.
They also indirectly told us that most candidates go up to the 2nd round of the interview until the recruiter gets a No Hire or Strong No Hire from the interviewer.

Round 1:
Started with a brief intro and quickly jumped to the question.
Given an array city where each element of the array is the height of the building in the city you have to make the skyline of the city a straight line, also if a building has a height of length 0 it is not considered in the skyline.
You can only decrease the height of any building in the city by 1 in 1 move. You have to minimize the number of steps.

Ex:-
City = [5, 4, 3, 6, 7]
Expected: 9
Explanation :
If we make the city = [4,4,0,4,4] we get the minimum possible answer = 9
It took me around 15-20mins to get to the most optimal solution and coded the same.

Then he gave a follow-up:
What if we can ignore 1 building from the city?

I could not solve the follow-up in the given time. :(
Next 15 mins he asked me around 5 Googliness questions.

Around 30mins later got my 2nd Interview Scheduled.

Round 2:
Quick Intro, followed by DSA question.
The question was a small variation of 210. Course Schedule II.

I quickly gave a brute force solution followed by the most optimal solution, I coded the solution.
He was satisfied with the solution and gave me an easy follow-up, this time I was able to solve the follow-up.
The interview ended a few mins early.

After an hour got my 3rd interview scheduled.

Round 3:
He gave his intro about what he does at google, and what a typical day at google India looks like, then he jumped to the problem.
There is a hierarchical organization, where each employee can be a subordinate or a senior of one or more employee[s], also we are given the salary of each employee.
We need to print those employees whose salary is less than equal to the mean of their subordinate's salary.
Assume you are given something like an adjecency list which describes the relationship between employees.

I quickly jumped to the solution gave him the optimal solution within 5-10mins of discussion, and coded the same in the next 5 mins, some edge cases were missing in my code to cover after some hints I was able to cover them as well.
He seemed satisfied with the solution, and gave me a follow-up :
What if we need to print those employees whose salary is less than equal to the median of their subordinate's salary?

I tried explaining to him the solution in which we keep 2 heaps to get the answer in running, after much strugle I was able to get very close to the solution he was expecting, and he quickly asked me to write the pseudo code for the following.

The next 15min were upon Googliness.

Verdict : Rejected
My Leetcode Profile looks something like this : 160 E, 395 M, 70 H.

Comments (4)