Snapchat Interview Questions
Practice the exact questions companies are asking right now.
Design a short-video recommender for short-term interest
Scenario You are designing a short-video recommendation system (similar to a swipe/feed product). The system must personalize the feed for each user a...
Explain core ML fundamentals and tradeoffs
ML Fundamentals Interview Prompt Answer the following ML fundamentals questions clearly and with practical examples: 1. Bias vs. variance - What ar...
Design a Story feature with offline support
Design a “Story” feature (similar to a social app’s stories) with the following capabilities: Core user features - Users can create a story (photo/vid...
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....
Check whether an integer is a power of two
Given a signed 32-bit integer n, return true if n is an exact power of 2, otherwise return false. A power of 2 is a number of the form 2^k where k >= ...
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...
Find max node-value range across components
Problem You are given an undirected graph with: - n: number of nodes (assume nodes are labeled 1..n) - from[]: list of edge start nodes - to[]: list o...
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...
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...
Compute CTR and metrics with pandas
Using pandas only, compute banner and story metrics. Assume today is 2025-09-01 and 'last 7 days' means 2025-08-26 to 2025-09-01 inclusive. You are gi...
Design a harmful content detection system
System Design: End-to-End Harmful Content Detection (Multilingual, Multimodal) Context You are designing a safety system for a large, mobile-first, ep...
Compute posterior spam risk from flags
A binary classifier flags spammy requesters. Last week the base rate of spam among all requesters was 12%. The classifier has true positive rate (TPR)...
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...
Compute expectations and test fairness for coin flips
You are analyzing repeated flips of a (possibly unfair) coin. Setup Let the probability of Heads be \(p\) (unknown in general). Assume flips are indep...
Implement a size-bounded LRU cache
Design and implement an LRU (Least Recently Used) cache where the cache capacity is measured by total size, not by item count. Each cached item has a ...
Implement a dictionary without built-in Dictionary
Implement a key-value map type (a “dictionary” / hash map) from scratch, without using the language’s built-in dictionary/map as the underlying storag...
Solve Open the Lock BFS
Question LeetCode 752. Open the Lock – Given an initial lock state "0000", a target combination, and a list of deadend combinations that cannot be use...
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...
Derive logistic regression and thresholds
Logistic Regression Deep Dive (Binary Classification) Assume a binary classification setting with observations {(x_i, y_i)} for i=1..n, where x_i ∈ R^...
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...