Snapchat Software Engineer Interview Questions
Practice the exact questions companies are asking right now.
Determine blockage and parse HTML tokens
Question Given a set of 2-D circular stones, determine whether they can completely block the width of a river. You may define the input format. Given ...
Compute sliding window median
Question LeetCode 480. Sliding Window Median: Given an array nums and an integer k, find the median of each sliding window of size k as the window mov...
Handle cards, islands, Trie, median
Question LeetCode 914. X of a Kind in a Deck of Cards LeetCode 694. Number of Distinct Islands LeetCode 208. Implement Trie (Prefix Tree) LeetCode 295...
Design backend for Uber-like ride-hailing service
Design the backend system for a ride-hailing platform similar to Uber. Focus on: - How ride requests are placed and matched with drivers ("order takin...
Compute longest increasing path in matrix
You are given an m x n grid (matrix) of integers grid, where m >= 1 and n >= 1. A path in the matrix is a sequence of cells where: - You may move from...
Count ways to decode digit string
You are given a string s consisting of digits '0' to '9'. The string encodes a message using the following mapping: - '1' → A, '2' → B, ..., '26' → Z....
Implement sin(x) with precision constraints
Coding Question: Implement sin(x) Implement a function that returns an approximation of the trigonometric sine function. Function signature - Input: a...
How do you decide with limited information?
Behavioral Question Describe a time you had to make an important decision with incomplete, ambiguous, or conflicting information. Include: - What deci...
Design ride-hailing and price alert systems
During a system design interview, you are asked two related but separate questions: Part 1: Design a ride-hailing service (similar to Uber) Design the...
Implement LRU cache and prime products array
You are given two separate coding tasks. Task 1: Implement an LRU cache Implement an in-memory cache with a fixed capacity that evicts the least recen...
Find top co-purchased products
You receive purchase logs where each order is represented as an integer array of product IDs bought together in a single transaction. Implement a func...
Design product co-occurrence analytics API
Design RESTful APIs for Co‑Purchase Analytics Context You are designing backend APIs to power a "related products" module based on co‑purchase behavio...
Design a streaming ads system
System Design: Ad-Insertion Platform for Live and On-Demand Video Context You are designing an end-to-end ad-insertion platform for a consumer video s...
Solve a two-jug measuring problem
You are given two jugs with capacities x and y liters and an unlimited water source. You may perform these operations: fill a jug, empty a jug, or pou...
Implement binary search for boundary index
Given a sorted integer array nums (length n) and an integer target t, return the index of the first element in nums that is greater than or equal to t...
Compute islands in a binary grid
You are given an m-by-n grid of characters where '1' represents land and '0' represents water. Count the number of connected land masses (islands) usi...
Design Manhattan-distance meeting point finder
Given an m×n grid with cells marked 1 for homes and 0 otherwise, choose a single meeting cell that minimizes the sum of Manhattan distances from all h...
Explain median vs mean for L1/L2
Median vs Mean Under L1 and L2, and the 2D Extension Task Explain, with intuition and a brief derivation, why: - In 1D, the median minimizes the sum o...
Describe improving workflow and challenges
Behavioral: Improving a Team's Development Workflow You are a software engineer in a technical screen. Answer using a concise, structured story (e.g.,...
Count islands with eight-direction adjacency
You are given an m×n grid of characters '1' (land) and '0' (water). Count the number of islands, where cells are connected if they touch in any of the...