Loading…
Shopify Interview experience
1 round over 2 weeks. No offer, meh experience.
First round was a pair programming question where I was asked to navigate a robot around a room.
Question:
You’ve got a Roomba in a room laid out as a grid. Each cell is either empty or blocked. The roomba can move forward, turn left, or turn right, but if it encounters a blocked cell it’ll bump into it and stay put. The goal is to get the robot to clean every accessible cell in the grid using only these movements.
// rotates/turns by 90 degrees
def turn_left()
def turn_right()
// cleans the current cell
def clean()
// moves the roomba forward
def move()
room = [
[1, 1, 1, 1], # Row 0
[1, 0, 0, 1], # Row 1
[1, 1, 1, 1], # Row 2
[1, 0, 1, 1] # Row 3
]
# 1: Accessible cell
# 0: Blocked cell
# starting position of the Roomba
row = 2
col = 2Know someone interviewing at Shopify? Pass it on.
Same company, different candidates.
Share yours while it’s fresh. It takes five minutes, it’s anonymous, and it will help future candidates.