Google
More Experiences
Google L4 Telephone Screen
April 7, 2025 • 3 reads
Summary
I had a telephone screen with Google for an L4 role where I was presented with the 'Linear Chess' problem.
Full Experience
Linear Chess
Given two strings, start and target. Is it possible to reach target from start given the conditions.
- String can contain "L", "R" or "_".
- L denotes a left pawn which can move only in left direction, R denotes a right pawn which can move only in right direction.
- Pawns can't capture or jump over other pawns.
Example : start = "LL" target = "L_L_" output - True
Interview Questions (1)
Q1
Linear Chess
Data Structures & Algorithms
Given two strings, start and target. Is it possible to reach target from start given the conditions.
- String can contain "L", "R" or "_".
- L denotes a left pawn which can move only in left direction, R denotes a right pawn which can move only in right direction.
- Pawns can't capture or jump over other pawns.
Example : start = "LL" target = "L_L_" output - True