Waymo Interview Questions
Showing 13 questions
Given a set of points on a plane, find the maximum number of points that lie on the same straight line. Determine the line that passes through the most points.
#1. Max Points on a Line
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#2. Number of Islands
You are given a list of meeting time intervals. Determine the minimum number of conference rooms required to accommodate all the meetings without any overlap.
#3. Meeting Rooms II
Find the minimum number of moves a knight needs to reach a target position on an infinite chessboard, starting from (0, 0).
#4. Minimum Knight Moves
You are given a grid where some cells are buildings and others are obstacles or empty land. Find the shortest distance a person can travel from an empty land cell to reach all the buildings.
#5. Shortest Distance from All Buildings
Simulate a simplified Excel sheet and implement the SUM formula. You'll need to parse cell ranges and calculate their sum.
#6. Design Excel Sum Formula
Determine if a given 9x9 Sudoku board is valid. Check if each row, column, and 3x3 subgrid contains the digits 1-9 without repetition.
#7. Valid Sudoku
Find the largest rectangular area that can fit within a histogram defined by an array of bar heights. You are given an array representing the height of bars, where each bar has a width of 1.
#8. Largest Rectangle in Histogram
Implement a Tic-Tac-Toe game where players take turns placing their marks. Design the game logic to efficiently determine the winner after each move.
#9. Design Tic-Tac-Toe
Given a sequence of words and a line width, format the text to fit within the specified width. You must justify the text, distributing extra spaces evenly between words.
#10. Text Justification
Determine if a group of people can be divided into two sets such that no two people who dislike each other are in the same set. You're given a list of dislikes; can you split the group?
#11. Possible Bipartition
Find a peak element in an array, where a peak is greater than its neighbors. You only need to return the index of any one peak element if multiple exist.
#12. Find Peak Element
Determine if you can divide an array of numbers into sets, where each set contains K consecutive numbers. The goal is to check if such a division is possible.
#13. Divide Array in Sets of K Consecutive Numbers