- Published on
Google on-campus interview experience Dec 2023
- Author
- Shared Anonymously
# Background
Mtech - CSE from Tier-1 College
# 1. OA
Duration - 60 minutes
Questions - 2 from a set of 10-12 Questions for the test happening PAN India.
This was a window test and were medium to hard level.
# 2. Interview Shortlist
30 Students shortlisted from our college. 6 People were shortlisted from MTech CSE. Google is known to shortlist based on GATE rank/ CGPA from MTech CSE, when a lot of candidates complete the test.
# 3. Prep Session for Interview
They conducted a prep session where they detailed the on-campus interview process. They strictly mentioned that no technical questions will be asked apart from DSA.
While solving the DSA problem, we were expected to understand and explain the approach to the interviewer for the initial 5-10 minutes. Then we need to code the solution and dry run the code and think of edge cases, and provide the Time and Space Complexity Analysis. If time permits, the interviewer will pose some follow up questions. (Better to complete as fast as possible to allow some follow up question, or either suggest these follow-ups questions/solution yourself while solving the first problem)
Further, for googlyness round, you somehow have to connect the question with project/experience from the resume (these questions were non-technical).
# 4. Interviews
# a. Round 1
Consisted of 45 minutes of DSA round. Question was simple, which I solved using Binary Search. Q. Find the length of the largest substring consisting of the same characters, having at least three occurrences.
e.g. aaabaabbcc -
Answer - aa
Explanation - aaa consist of two occurrence of aa
These substrings can be overlapping.
I created a map of vector which each character as key and length of cluster of same character as element of vector
For the above question my solution had map as
a - 3 2
b - 1 2
c - 2
Further, I did binary search on this map on length of the substring.
# b. Round 2
Consisted of 45 minutes of DSA round and 15 minutes of googlyness round by the same interviewer.
The question was similar to the Course Schedule Question (Leetcode 207. https://leetcode.com/problems/course-schedule/description/). Only I have to find a minimum number of semesters. I did it in 30 minutes using Kahn’s Algorithm along with a dry run and complexity analysis. While solving I suggested whether I should be also checking for cycles, which the interviewer used as a follow up question.
For the googlyness round I was asked, how would I act if one of the team members is non-performing (this question was handed out in interview prep session) and some follow-up question in the same line.
I made a quite few mistakes while solving this question which I compensated it with clean code.
# c. Round 3
Again, consisted of 45 minutes of DSA and 15 minutes of googlyness round. The question was similar to Leetcode question 85. https://leetcode.com/problems/maximal-rectangle/ The difference being, the rectangle consisted of 3 different symbols ('A', 'B', 'C'), and I have to find the symbol with largest rectangular area. I solved it using a simpler algorithm, wherein I first traversed a row to maintain histogram and then further, did two traversal to find left smallest element and right smallest element and one more traversal to find the area. After completing the dry run and complexity. The interviewer suggested minimizing the number of traversals to which I replied that I had learned such a method but I don't remember it now. The interviewer also helped while writing the code with hints.
For the googlyness round I was asked how do I prioritize my work and I gave them some theory which I had learned in my last job.
# Verdict
I had low expectations since in my third round I made a lot of mistakes while coding (I left an uninitialized variable in Round 1) and had to take a lot of hints. But I think I compensated it with a complete dry run, even for sub modules (e.g. I did a dry run to calculate lse and rse in round 3) and clarity on the approach and the solution. Also, I gave quite diplomatic answers for googlyness round.
I was extended the offer on Day 1 of placement.
Compensation Details
https://leetcode.com/discuss/compensation/4771966/Google-or-Software-Engineer-University-Graduate-Dec-2023
EDIT
As someone pointed out:
Question 1 : https://leetcode.com/problems/find-longest-special-substring-that-occurs-thrice-ii
Question 2: https://leetcode.com/problems/parallel-courses-ii/