Google | L3 New Grad | Bangalore | May 2020 [Reject]
Anonymous User
2255

Two months ago i was interviewed by Google. Here is my interview experience

  • HR Phone Screen (15 mins)
    Basic time complexity questions of Heap sort, Quick sort and Merge Sort, and talked about the whole recruiting process.

  • Phone Interview (45 mins)
    We have a garage with a single lane and the garage is divided into multiple parking spots with various heights (h0, h1, h2, ...). The cars have the same parking spot width and various heights (c1, c2, c3, ...). Once you put a car in a parking spot you can't put any more cars in subsequent spots as the car is blocking the lane.

    Calculate the maximum numbers of cars we can park in this garage.

    Example:

    image
    Cars (height): 5, 1, 3, 3, 4
    Result: 3 cars (cars with height 1, 3, 3)

  • Onsites

  1. Round 1 (Technical - 45 mins)
    Given a 2D matrix, find the largest rectangular sub-matrix whose sum is 0.

  2. Round 2 (Technical - 45 mins)
    Given a family tree and 2 nodes, tell if the nodes are connected by blood or not.
    For the given family tree,
    image

    Nodes P and K are connected by blood
    Nodes C and K are connected by bood
    Nodes C and E are not connected by blood

    (while implementating, how to represent graph or graph parameters were also expected)

  3. Round 3 (Technical - 45 mins)
    Given a binary tree calculate the time required for the whole tree to get wet if water is poured at root at t=0, and every edge requires different time to pour water from parent node to child node.
    Interviewer expected to return the path which took maximum time.
    Example,
    image

Total time taken for the tree to get wet = 6
Path - [A, B, E]

  1. Round 4 (Googleyness and Leardership Skills - 30 mins)
    Talked about different senarios regarding leadership skills and team spirit.

  2. Round 5 (Technical - 45 mins)
    Given a scheduler and n-1 processes with the start and end time. You are given nth process with start time and end time, you need to find whether the nth process can be scheduled by the scheduler without overlapping with other processes.
    The interviewer's main focus was to discuss the appropriate data structure to be used to store the given processes which required time complexity (for accessing and inserting) less than O(n).

Tips:

  • Solve as many questions as you can.
  • It is not only important to approach the question correctly but also it is very important to solve a question fast. So when you are practicing leetcode questions i would suggest to try to solve a question by setting time limits. (For leetcode medium question - 20 to 25 mins, for leetcode difficult question - 45 mins with coding).
  • While solving be very clear with explaining the approach and also be clear with the interviewer about the assumptions while writing the code.
  • A neat and clean code is expected by you during the interview, hence while preparation practice writing the code either on paper or whiteboard or Google Docs, because editors are not provided during onsite interviews.
Comments (9)