Google onsite
- Result
- Offer
- Posted
- 18 Mar 2022
Summary
I had an onsite interview at Google where I tackled several algorithm problems similar to those on LeetCode. Despite the problems not being exact matches, the links I provided convey the type of challenges I faced. I was successful in my interview and received an offer.
How it went
My onsite interview experience at Google involved several coding rounds. While the problems I was given weren't identical to specific LeetCode questions, I've shared links to similar problems that represent the core concepts and difficulty level I encountered. It was a challenging yet rewarding process. I'm happy to share that I successfully cleared the interviews and received an offer to join Google, where I've been working for some time now. To everyone currently preparing for interviews, keep pushing forward; your hard work will pay off!
Questions asked (3)
- 01
Race Car
Data Structures & Algorithms · Hard
Open the problemYour car starts at position 0 and speed +1 on an infinite number line. Your car can go into two actions: 'A' (Accelerate) and 'R' (Reverse). 'A': position += speed, speed *= 2. 'R': if speed is positive then speed = -1 else speed = 1, position remains the same. Find the minimum number of instructions to get to a target position.
- 02
Shortest Path in a Grid with Obstacles Elimination
Data Structures & Algorithms · Hard
Open the problemYou are given an m x n integer matrix
gridwhere each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right. If you want to move from a cell(x, y)to(x+1, y), andgrid[x+1][y]is 1, you can eliminate this obstacle. You are also given an integerk, which is the maximum number of obstacles you can eliminate. Return the minimum number of steps to walk from(0, 0)to(m-1, n-1)or -1 if it is not possible. - 03
Maximum Number of Visible Points
Data Structures & Algorithms · Medium
Open the problemYou are given an array
points, an integerangle, and alocationarray[pos_x, pos_y]wherepoints[i] = [x_i, y_i]denotes the position of pointion a 2D plane. You are standing atlocationand can see all the points in a circular sector. The sector's angle isangledegrees, and its origin is yourlocation. You can rotate this sector counter-clockwise around yourlocation. Return the maximum number of points you can see. Note that points that are exactly at your location should always be counted.