Snap Coding Interview Questions
26 Snap coding interview problems with full optimal solutions — 16 easy, 8 medium, 2 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Snap interviewer values, and a FAQ section.
Showing 8 problems of 26
- #48mediumfoundational
48. Rotate Image
Snap's camera pipeline rotates raw sensor frames in-place before applying AR filters — knowing how to transpose and reflect a matrix without allocating extra memory maps directly to that constraint.
- #56mediumfoundational
56. Merge Intervals
Snap Stories expire at varying times and the timeline renderer collapses overlapping active-story windows into continuous display segments — merge intervals is exactly that computation.
- #133mediumfoundational
133. Clone Graph
Snap's friend-graph data model is serialized and deep-cloned for A/B test sandboxes and recommendation experiments — clone graph is the interview distillation of that operation.
- #146mediumfoundational
146. LRU Cache
Snap Memories and story previews rely on an LRU layer to decide which media blobs to keep in RAM — this problem is the exact data-structure contract that cache layer implements.
- #200mediumfoundational
200. Number of Islands
Snap's AR segmentation detects connected regions of similar pixels to isolate faces and objects — number of islands is the graph-traversal core of that pipeline.
- #215mediumfoundational
215. Kth Largest Element in an Array
Snap's notification ranking surfaces the top-K most-engaged snaps in a user's inbox — finding the Kth largest is the primitive that backs that ranking without a full sort.
- #286mediumfoundational
286. Walls and Gates
Snap Maps uses a similar multi-source BFS to compute the minimum walking distance from every map cell to the nearest point of interest — walls and gates is the canonical warmup for that spatial query.
- #362mediumfoundational
362. Design Hit Counter
Snap's view-count and snap-open-rate metrics run through a sliding-window counter — this problem is the foundational design exercise behind that system.