Shopify

Shopify Software Engineer Interview Questions

11+ questions from real Shopify Software Engineer interviews, reported by candidates.

11
Questions
2
Round Types
4
Topic Areas
2021-2026
Year Range

Round Types

System Design 1 Phone Screen 1

Top Topics

Questions

**Question:** Implement a NUMBER guessing game. The user must guess a 4-digit number (without repeats). The user has 7 attempts. Every attempted guess must be a 4-digit number. They either: wins (gues

I recently got an invitation for Shopify's 45-minute pair programming interview for their summer 2026 internship program, where interviewees take on a "real world challenge around object-oriented prog

So I got a technical interview (pair programming) for shopify SDE intern, and the email said that it is going to be a **Systems Design problem.** I have never given a systems design interview and I am

I passed the phone screen which was an easy question of having prices of items and discount strategies (e.g. apple buy one get one free, orange buy two get one...

## Problem Implement an `AccountManager` that handles user accounts with roles (`admin`, `member`, `guest`). Each role has different capabilities. The system must support: ```python class AccountManager: def create_account(self, username: str, role: str) -> str: # returns account_id def deactivate(self, account_id: str) -> bool: def change_role(self, requester_id: str, target_id: str, new_role: str) -> bool: def get_capabilities(self, account_id: str) -> list[str]: def audit_log(self) -> list[dict]: # returns all actions taken ``` Only `admin` accounts can change roles. Deactivated accounts cannot perform any actions. All state changes are logged. ## Example ``` am = AccountManager() admin_id = am.create_account("alice", "admin") member_id = am.create_account("bob", "member") am.change_role(member_id, admin_id, "guest") -> False # bob can't change roles am.change_role(admin_id, member_id, "admin") -> True am.deactivate(member_id) am.change_role(member_id, admin_id, "guest") -> False # deactivated ``` ## Follow-ups 1. How do you prevent privilege escalation bugs when adding new roles? 2. What test cases would you write to ensure role change authorization is correct? 3. How would you extend this to support time-limited role grants?

## Problem Design a car rental system supporting multiple vehicle types, locations, and concurrent reservations. Implement: ```python class CarRentalSystem: def add_vehicle(self, vehicle_id: str, type: str, location: str, rate_per_day: float) -> None: def search_available(self, location: str, start: date, end: date, type: str = None) -> list[str]: def reserve(self, user_id: str, vehicle_id: str, start: date, end: date) -> str: # reservation_id def cancel(self, reservation_id: str) -> bool: def get_bill(self, reservation_id: str) -> float: ``` A vehicle cannot be double-booked. `search_available` must return vehicles with no overlapping reservations. ## Example ``` system.add_vehicle("CAR-1", "sedan", "NYC", 50.0) system.reserve("alice", "CAR-1", date(2025,6,1), date(2025,6,5)) system.search_available("NYC", date(2025,6,3), date(2025,6,6), "sedan") # -> [] (CAR-1 overlaps: Jun 1-5 overlaps Jun 3-6) system.get_bill(reservation_id) # -> 200.0 (4 days * $50/day) ``` ## Follow-ups 1. How do you handle concurrent `reserve` calls for the same vehicle? 2. How would you model late returns and additional charges? 3. Sketch the database schema. How do you index reservations for fast availability search?

## Problem Given four single-digit integers, insert `+`, `-`, `*`, `/` between them (in any order, using each digit exactly once) to reach a target value. Return all distinct valid expressions. You may also use parentheses to change evaluation order. ```python def four_digits( digits: list[int], # exactly 4 digits target: int ) -> list[str]: # list of valid expression strings pass ``` ## Example ``` Input: digits=[1, 2, 3, 4], target=24 Sample valid outputs: "1 * 2 * 3 * 4" -> 24 "(1 + 2 + 3) * 4" -> 24 "(2 + 3 - 1) * 4" -> 16 (invalid) Output: ["1 * 2 * 3 * 4", "(1 + 2 + 3) * 4", ...] ``` ## Follow-ups 1. How many distinct expression trees are possible with 4 operands and 4 operators? Enumerate the cases. 2. How do you handle division by zero safely? 3. For which sets of 4 digits is it impossible to reach 24? 4. How does complexity scale if extended to `n` digits?

## Problem Implement a number guessing game with binary search or feedback-based narrowing of the answer range. ## Likely LeetCode equivalent Similar to Guess Number Higher or Lower (LC 374). ## Tags binary_search, shopify, pair_programming

## Problem Implement an inventory management system for a warehouse. It must track stock levels, process orders (reducing stock), accept restocks, and trigger automatic reorder alerts when stock falls below a threshold. ```python class InventorySystem: def add_product(self, sku: str, quantity: int, reorder_point: int, reorder_qty: int) -> None: def fulfill_order(self, sku: str, quantity: int) -> bool: # False if insufficient stock def restock(self, sku: str, quantity: int) -> None: def get_alerts(self) -> list[str]: # SKUs below reorder_point def inventory_snapshot(self) -> dict[str, int]: # sku -> current quantity ``` ## Example ``` inv.add_product("SKU-A", quantity=100, reorder_point=20, reorder_qty=50) inv.fulfill_order("SKU-A", 85) -> True (stock: 15) inv.get_alerts() -> ["SKU-A"] # 15 < 20 inv.restock("SKU-A", 50) # stock: 65 inv.get_alerts() -> [] # 65 >= 20 ``` ## Follow-ups 1. How would you handle concurrent fulfill_order calls for the same SKU? 2. Add support for batch orders across multiple SKUs — atomically succeed or fail all. 3. How would you design the database schema for this, with full order history?

## Problem A robot starts at position `(0, 0)` facing North on an infinite grid. You are given a string of commands and must parse and execute them: - `F` — move forward one step - `B` — move backward one step - `L` / `R` — rotate 90 degrees left/right - `REP n { ... }` — repeat the enclosed commands `n` times Return the robot's final `(x, y)` position and facing direction. ```python def run_robot(commands: str) -> tuple[int, int, str]: pass ``` ## Example ``` Input: "REP 3 { F R } F" Steps: Iteration 1: F -> (0,1) N; R -> facing E Iteration 2: F -> (1,1) E; R -> facing S Iteration 3: F -> (1,0) S; R -> facing W Final F -> (0,0) W Output: (0, 0, "W") ``` ## Follow-ups 1. How would you implement this using a recursive descent parser vs. a stack-based approach? 2. Add a `JUMP label` / `LABEL name` instruction — how does this change your execution model? 3. How do you detect and handle infinite loops in commands?

## Problem You have `n` items with sizes and `k` bins each with a fixed capacity. Assign each item to exactly one bin such that no bin exceeds its capacity, and the number of bins used is minimized. Items cannot be split. ```python def size_match( items: list[int], # sizes of items bin_capacity: int ) -> list[list[int]]: # each inner list = item indices in that bin pass ``` ## Example ``` Input: items=[4, 3, 5, 2, 6], bin_capacity=8 First-Fit Decreasing: Sorted: [6, 5, 4, 3, 2] Bin 1: [6, 2] (sum=8) Bin 2: [5, 3] (sum=8) Bin 3: [4] (sum=4) Output: [[4, 1], [2, 3], [0]] # indices # 3 bins used ``` ## Follow-ups 1. First-Fit Decreasing gives at most (11/9)OPT + 6/9 bins — can you prove why? 2. How do you solve this exactly using dynamic programming or ILP for small inputs? 3. How does the problem change if bins have both weight and volume constraints?

What Shopify Looks for in Software Engineer Interviews

Shopify Software Engineer interviews are calibrated against the level and scope expected of the role. Across 11+ verified candidate reports on LeakCode, the consistent signals interviewers look for: clear problem decomposition before coding, explicit complexity reasoning, structured handling of edge cases, and the ability to articulate trade-offs between two reasonable approaches.

The discriminator between candidates who advance and candidates who do not is rarely the final correctness of the solution. It is the path to the solution: did you ask clarifying questions, did you state your approach before coding, did you handle edge cases without prompting, and did you communicate your reasoning throughout. Reports tagged "no hire" frequently cite a working solution with poor communication; reports tagged "strong hire" cite clear thinking even when the final solution was incomplete.

How To Use This Question Set

Real interview reports are a calibration tool, not a memorization target. Companies update their question pools every 2-4 months; memorizing exact problems risks misleading you when the interviewer uses a variant. The high-leverage use: identify the patterns that appear repeatedly in Shopify Software Engineer reports, practice those patterns on similar (not identical) problems, and use the reports to understand the interviewer's typical follow-up depth.

Filter the questions below by round type, difficulty, and recency. Focus first on reports from the past 6-12 months; older reports may reference questions that have since rotated out of Shopify's pool. Reports tagged with quantified difficulty (e.g., "medium-hard") are higher-signal than reports without difficulty tags.

Round-by-Round Expectations

Shopify Software Engineer loops typically span 4-6 rounds across phone screens and on-site or virtual on-site interviews. The structure varies by company: some run 1 recruiter screen + 1 technical phone + 3-4 on-site rounds; others run 1 recruiter screen + 1 OA + 4-5 on-site rounds. The recruiter screen is logistics and culture-light; the technical phone screen is medium-difficulty coding; the on-site loop covers coding, system design (at L4+ levels), and behavioral rounds.

Each round is designed to surface a specific signal. Coding rounds: correctness, code quality, complexity reasoning, communication. System design rounds: requirements clarification, design judgment, operational thinking. Behavioral rounds: ownership scope, leadership, ambiguity tolerance, conflict navigation. Strong candidates explicitly hit each signal dimension out loud during the round; weak candidates focus only on solving the prompt.

Common Interview Mistakes At This Combination

Reports tagged "no hire" at Shopify Software Engineer commonly cite: jumping into code without clarifying requirements, coding silently for 10+ minutes without verbalizing approach, missing edge cases (empty input, single element, very large input, overflow), and producing a working solution that the candidate cannot explain or refactor when probed. Strong candidates avoid these patterns by following a consistent template: clarify, verbalize approach, code with narration, test with examples.

Behavioral and design rounds have their own failure modes. Behavioral: stories that use "we" instead of "I" diluting individual signal, stories with no quantified outcome, defensiveness when probed about failure. Design: not asking clarifying questions, not stating requirements out loud, designing for a single server when the prompt clearly implies scale, ignoring operational concerns (deployment, monitoring, rollback). These show up in roughly half of Shopify Software Engineer interview retrospectives on LeakCode.

See All 11 Shopify Software Engineer Questions

Full question text, answer context, and frequency data for subscribers.

Get Access