← Snowflake Interview Insights

Snowflake·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Snowflake software engineer round 2, coding focused. Got a parallel scheduling problem and then the harder variant right after. Finished both in 20 minutes which felt pretty good.

Questions Asked (1)

Q1

Given a set of tasks with dependencies, how would you schedule them to run in parallel as efficiently as possible? (Follow-up: solve the harder variant of the same problem.)

Algorithms & Data StructuresSystem Design
Author's notes

Knocked out both the base version and the follow-up in about 20 minutes total.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem: tasks with dependencies form a DAG, and we need to schedule them on parallel workers to minimize total time. For the basic variant, use topological sort with a queue to assign tasks to workers greedily; for the harder variant (minimizing makespan with arbitrary processing times), explain that it's NP-hard and discuss heuristics like critical path or list scheduling, or exact methods for small cases.

Pro tip: Demonstrate awareness of the NP-hardness of the harder variant and pivot to practical heuristics—interviewers at Snowflake value pragmatic engineering over theoretical perfection.

1. Clarify the problem and constraints

Ask about the number of workers, whether task durations are uniform, and if preemption is allowed. Confirm that dependencies form a DAG and define the optimization goal (e.g., minimize makespan).

2. Model as a DAG and identify the basic solution

Explain that the basic variant (unit-time tasks) can be solved with topological sort and a queue, assigning ready tasks to available workers greedily. This yields an optimal schedule when all tasks take equal time.

3. Address the harder variant

State that with arbitrary task durations, minimizing makespan on parallel machines is NP-hard (reduction from partition). Discuss heuristics like list scheduling (priority by critical path length) and mention that it gives a 2-approximation.

4. Discuss practical considerations and trade-offs

Mention real-world factors: worker heterogeneity, communication overhead, fault tolerance, and dynamic task arrival. Explain how you would adapt the algorithm (e.g., use a priority queue and monitor worker load).

5. Summarize and evaluate

Conclude by comparing approaches: for the basic case, topological sort is optimal and O(V+E); for the harder case, heuristics like critical path or list scheduling are practical, and exact solutions (e.g., ILP) are only feasible for small instances.

Key Points to Mention

  • Topological sorting for dependency resolution
  • Greedy assignment of ready tasks to available workers
  • NP-hardness of minimizing makespan with arbitrary task durations
  • List scheduling and critical path heuristic as a 2-approximation
  • Use of priority queue to manage ready tasks by priority (e.g., longest processing time first)
  • Real-world constraints: worker capacity, communication cost, and fault tolerance

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