InterviewLegend

Simulation & State Machines

Alex Chen22 min readGuide updated 15 real interview reports

Shopify's pairing session often gives you a simulation to build. Common versions are a floor robot crossing a grid under a stream of commands, a job runner working through a queue and retrying whatever failed, and a command-line game that counts down a player's attempts. Each one is a small amount of state plus the rules for advancing it, and the round grows by adding rules to the same program.

It really is pair programming. You type in your own editor, in your strongest language, with docs open and, since 2025, an AI assistant if you want one. An engineer works with you for 75 to 90 minutes and talks through the build as it happens. Shopify cares more about how carefully you build than about how much you finish, so the first version can be very plain. It only has to run, and you have to be able to show it running.

Then the requirements come. Typical ones are shelves on the floor the robot has to avoid, a bonus rule in the game, or a second robot whose collisions you now have to handle. Each of these should cost one new table entry or one extra condition inside a helper. If one forces a rewrite, the model underneath was wrong.

ShopifyPremium lesson · Coding round

The 2 Shopify problems are below.

  1. A Premium questionCoding · Medium · Signature problem
  2. A Premium questionCoding · Medium · Frequently asked

Each with hints, the follow-up and a tested solution.

Get the Shopify questions

$49 a year · all 122 companies · instant access

21,000+ candidate reports · guide updated

Shopify interview guide

Know what Shopify asks before you walk in.

26 coding · 5 system design · 21 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Shopify interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.