← Shopify Interview Insights

Shopify·Machine Learning Engineer·Technical Phone Screen·Intermediate

IntermediateRejected
May 2026Remote

Summary

75-minute technical screen for an MLE role at Shopify, centered entirely on a mobile robot grid problem with three follow-up extensions. Rejection email came the next day, which stings a little when you thought you were keeping up.

Questions Asked (3)

Q1

Given a 2D grid, navigate a mobile robot from a start position to a target position. Then extend the solution to handle obstacles on the grid.

Algorithms & Data Structures
Author's notes

The base problem was familiar enough that I felt okay going in.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem: grid size, movement allowed (4-directional or 8-directional), and whether diagonal moves have different costs. For the basic version, use BFS to find the shortest path; for obstacles, treat them as blocked cells and still use BFS if all moves have equal cost, or switch to A* with a heuristic like Manhattan distance for efficiency. Discuss trade-offs and mention that for large grids, A* with a good heuristic is preferred.

Pro tip: Mention that in real-world robotics, the grid is often represented as a costmap and algorithms like A* or Dijkstra are used with weighted costs; also, consider using a priority queue for efficiency and discuss how to handle dynamic obstacles.

1. Clarify requirements and assumptions

Ask about grid size, movement directions, cost of moves, and whether obstacles are static. Confirm if diagonal moves are allowed and if they have the same cost as straight moves.

2. Choose the appropriate algorithm

For unweighted grids, BFS guarantees shortest path. For weighted grids or larger spaces, use A* with a heuristic like Manhattan or Euclidean distance. For dynamic obstacles, consider D* or replanning.

3. Implement and handle obstacles

Represent obstacles as blocked cells. In BFS, skip them during neighbor expansion. In A*, include them in the cost calculation by treating them as impassable. Ensure the algorithm returns the path or reports no path exists.

4. Analyze complexity and optimize

Discuss time and space complexity: BFS is O(V+E) where V is number of cells and E is edges; A* depends on heuristic but typically explores fewer nodes. Mention optimizations like bidirectional search or jump point search for uniform grids.

5. Test and validate

Walk through a small example, including edge cases like start or target being blocked, no path exists, or start equals target. Verify the path is valid and optimal.

Key Points to Mention

  • BFS for unweighted grids, A* for weighted or larger grids
  • Obstacles as blocked cells; ensure algorithm handles them
  • Heuristic functions: Manhattan, Euclidean, or Chebyshev depending on movement
  • Time and space complexity analysis
  • Edge cases: no path, start/target blocked, start equals target
  • Real-world considerations: dynamic obstacles, replanning, costmaps

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Now extend the robot navigation problem to handle multiple robots moving simultaneously on the same grid.

Algorithms & Data StructuresSystem Design
Author's notes

This is where I started sweating.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the problem constraints and define the multi-robot navigation model, including state space, collision rules, and objectives. Then, propose a solution that extends single-robot algorithms to multi-agent settings, such as prioritized planning or cooperative A*, and discuss trade-offs between optimality, completeness, and computational efficiency.

Pro tip: Emphasize scalability and real-world applicability by discussing how your approach handles increasing numbers of robots and dynamic environments, and mention any ML techniques that could improve coordination, like reinforcement learning for decentralized control.

1. Clarify Requirements and Constraints

Ask questions to understand the grid size, number of robots, movement rules (e.g., simultaneous moves, collision types), and optimization goals (e.g., minimize makespan, total distance).

2. Define State Space and Collision Model

Represent the joint state of all robots and specify collision conditions (vertex and edge conflicts). This formalization is crucial for algorithm design.

3. Choose a Coordination Approach

Select a method like prioritized planning, cooperative A*, or conflict-based search (CBS). Discuss whether it's centralized or decentralized and its completeness/optimality guarantees.

4. Analyze Complexity and Scalability

Evaluate time and space complexity, and discuss how the approach scales with the number of robots. Mention potential bottlenecks and mitigation strategies.

5. Consider ML Enhancements and System Design

Propose how machine learning (e.g., reinforcement learning for policy learning) could improve coordination or adapt to dynamic environments, and outline a system architecture for deployment.

Key Points to Mention

  • Prioritized planning: assign priorities to robots and plan sequentially, avoiding collisions with higher-priority robots.
  • Conflict-based search (CBS): a two-level algorithm that finds optimal solutions by resolving conflicts between individual robot paths.
  • Collision types: vertex conflicts (same cell at same time) and edge conflicts (swapping positions).
  • Decentralized approaches: using local communication and RL for scalable coordination.
  • Complexity: multi-robot path planning is PSPACE-hard, so trade-offs between optimality and efficiency are necessary.
  • Real-world considerations: dynamic obstacles, communication delays, and robustness to failures.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Extend the same robot navigation problem from a 2D grid to a 3D grid with x, y, and z axes.

Algorithms & Data Structures
Author's notes

Honestly the easiest of the three follow-ups conceptually.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by restating the 2D problem and its solution (e.g., BFS or A*), then systematically extend it to 3D by adding the z-axis and updating neighbor generation, distance metrics, and data structures. Discuss the implications for complexity, memory, and algorithm choice, and mention any optimizations or practical considerations for 3D grids.

Pro tip: Emphasize that the core algorithm remains the same but the state space grows cubically, so you must consider memory and time trade-offs; mentioning bidirectional BFS or A* with a 3D heuristic shows depth.

1. Clarify the problem and assumptions

Confirm the goal (e.g., shortest path from start to goal), movement constraints (6-connected vs 26-connected), and whether obstacles exist. State any assumptions about grid size and boundaries.

2. Choose the base algorithm

Select an appropriate algorithm for the 2D version, such as BFS for unweighted grids or A* for weighted grids, and justify your choice based on problem characteristics.

3. Extend to 3D

Modify the algorithm to handle 3D coordinates: update neighbor generation to include ±z, adjust distance calculations (e.g., Manhattan or Euclidean), and ensure data structures (queues, visited sets) store 3D points.

4. Analyze complexity and trade-offs

Discuss how time and space complexity scale with grid dimensions (e.g., O(N^3) for an N×N×N grid). Mention potential optimizations like bidirectional search, A* with admissible heuristics, or memory-efficient representations.

5. Address practical considerations

Talk about implementation details: handling large 3D grids, using sparse representations for obstacles, and any domain-specific constraints (e.g., robotics, ML for path planning).

Key Points to Mention

  • Neighbor generation in 3D: 6-connected (face neighbors) vs 26-connected (including edges and corners).
  • Distance metrics: Manhattan distance for 6-connected, Chebyshev for 26-connected, or Euclidean for continuous spaces.
  • Complexity: Time and space grow from O(N^2) to O(N^3) for an N×N×N grid.
  • Algorithm choices: BFS, Dijkstra, A* with 3D heuristics, or bidirectional search.
  • Data structures: 3D arrays, hash sets for visited nodes, and priority queues for A*.
  • Optimizations: pruning, hierarchical pathfinding, or using ML to predict promising regions.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.