practice a little every day, paws crossed ♡
Coding & Algorithms Interview Questions
Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.
- 9403
- Questions
- 546
- Companies
- 11
- Topics
- 8
- Languages
Showing 901–930 of 1080 results
- SnapchatMediumMachine Learning EngineerFind K Nearest Points
This question tests the ability to efficiently find the k-closest points to an origin in a 2D plane, focusing on heap-based or selection-based data structures.
Coding & AlgorithmsOnsiteHeapGeometryQuickSelect - SnapchatMediumMachine Learning EngineerFind Shortest Clear Grid Path
Solve the shortest clear path in an n by n binary grid using BFS in 8 directions. Covers blocked endpoints, visited marking, path length, correctness, complexity, and weighted-move follow-ups.
Coding & AlgorithmsOnsite - SnapchatMediumMachine Learning EngineerFind all quadruplets summing to target
This problem tests your ability to optimize nested loops using a two-pointer approach to achieve a time complexity better than brute force when searching for subsets of a fixed size that sum to a target value.
Coding & AlgorithmsOnsiteArraysTwo PointersSorting - SnapchatMediumSoftware EngineerFind top co-purchased products
This question evaluates algorithmic problem-solving and data engineering skills, focusing on computing and ranking co-occurrence frequencies, choosing efficient data structures for pairwise counts, and contrasting offline batch implementation with streaming updates.
Coding & AlgorithmsOnsite - SnapchatHardSoftware EngineerImplement LRU cache and prime products array
This question evaluates proficiency in implementing efficient mutable data structures and in enumerating combinatorial results, specifically testing understanding of LRU cache eviction behavior and generation of all non-empty subset products from a set of primes.
Coding & AlgorithmsOnsite - SnapchatHardSoftware EngineerImplement a Leaky Bucket Limiter
This problem tests your ability to implement a thread-safe rate limiter using the Leaky Bucket algorithm, requiring careful management of timestamps and shared state.
Coding & AlgorithmsOnsiteConcurrencyRate-LimitingAlgorithms - SnapchatHardSoftware EngineerImplement a size-bounded LRU cache
This problem tests your ability to extend the standard LRU cache pattern to support items with heterogeneous 'weights', requiring a data structure that maintains access order while managing a cumulative capacity constraint.
Coding & AlgorithmsOnsiteLRUHash MapDoubly Linked List - SnapchatMediumSoftware EngineerImplement binary search for boundary index
This question evaluates a candidate's ability to implement binary search for boundary indices, including correct handling of duplicates, providing iterative and recursive variants, and reasoning about time and space complexity.
Coding & AlgorithmsOnsite - SnapchatMediumSoftware EngineerMaximize correct guesses in a hat line puzzle
This problem tests your ability to devise a deterministic strategy for a group of people to maximize correct guesses about their own attributes based on observed information from others.
Coding & AlgorithmsOnsiteLogicParityGreedy Strategy - SnapchatMediumSoftware EngineerRadar Overlaps and Undetected Crossing of a Rectangular Room
Two-part geometry coding problem about circular radars placed inside a rectangular room. For each radar, list every other radar whose coverage overlaps it, then decide whether a point object can travel from the left wall to the right wall without entering any radar's coverage.
Coding & AlgorithmsOnsite - SnapchatHardMachine Learning EngineerRender an Organization Chart and Find Skip-Level Pairs
Build and render an organization tree with ordered indentation, infer its root, and return exactly two-level manager-descendant pairs.
Coding & AlgorithmsOnsite - SnapchatHardSoftware EngineerSolve Three Algorithmic Tasks
This set of three problems evaluates competencies in algorithm design and data structures, specifically efficient range counting on timestamped events, constrained selection/matching from double-sided cards, and merging multiple sorted lists.
Coding & AlgorithmsOnsite - SnapchatMediumSoftware EngineerSolve Three Coding Problems
This problem tests your ability to efficiently manage dynamic, sliding-window data streams and geometric grid traversal using graph search techniques.
Coding & AlgorithmsOnsiteHeapsSliding WindowBFS - SnowflakeMediumSoftware EngineerBuild a Top-Down Reporting Forest from Employee-Manager Pairs
Given employee-to-manager pairs of integer IDs, build the top-down reporting forest with every top-level manager as a root, and return it as a preorder listing of IDs and depths. Tests finding the roots, building child lists, deterministic sibling ordering, and handling long reporting chains.
Coding & AlgorithmsOnsite - SnowflakeMediumSoftware EngineerCompute shortest path between tree nodes
Given a binary tree and two node values u and v, return the shortest path between them as an ordered list of node values. This Snowflake onsite question tests lowest-common-ancestor logic, path reconstruction, iterative vs. recursive implementation, complexity analysis, and preprocessing strategies (parent pointers, binary lifting, Euler tour + RMQ) for answering many queries efficiently.
Coding & AlgorithmsOnsite - SnowflakeMediumSoftware EngineerCompute task order and layered execution
This question evaluates a candidate's understanding of graph algorithms and dependency resolution, covering concepts such as topological ordering and cycle detection.
Coding & AlgorithmsOnsite - SnowflakeMediumSoftware EngineerFind longest substring with at most k distinct
This question evaluates a candidate's ability to design efficient string-processing algorithms using sliding-window techniques, reason about time and space complexity, and correctly handle Unicode grapheme clusters when returning substrings.
Coding & AlgorithmsOnsite - SnowflakeMediumSoftware EngineerImplement crawler and bracket validator
This question evaluates competencies in web crawling and string validation, covering graph traversal and cycle avoidance with domain filtering for crawl discovery, and delimiter matching with error indexing for multi-type bracket validation.
Coding & AlgorithmsOnsite - SnowflakeMediumSoftware EngineerPrint an Org Chart as a Depth-Ordered List from Supervisor Pairs
Given a flat list of (person, supervisor) ID pairs, reconstruct the organization as a forest rooted at whoever has no supervisor, then emit a deterministic preorder listing of (id, depth). Tests root detection, building ordered adjacency lists, and careful DFS ordering.
Coding & AlgorithmsOnsitetreesgraphsdfs - SnowflakeEasySoftware EngineerSchedule prerequisite classes with retakes
This problem tests your ability to model dependencies using a Directed Acyclic Graph (DAG) and perform a topological sort while accounting for re-take conditions.
Coding & AlgorithmsOnsiteGraphTopological SortDependency Resolution - SnowflakeMediumSoftware EngineerSerialize and deserialize a dictionary trie
Snowflake software-engineer onsite coding question: design a compact, robust wire format to serialize and deserialize a dictionary trie. Covers DFS vs BFS encodings, delimiter vs length-prefix framing and escaping, explicit end-of-word markers, streaming, malformed/partial-input handling, forward/backward compatibility, Unicode, compression, memory limits, and O(N) complexity.
Coding & AlgorithmsOnsite - SnowflakeMediumData ScientistSolve and optimize 3Sum and variants at scale
This question evaluates algorithmic problem-solving skills in array processing, deduplication and combinatorial counting, external-memory and streaming algorithm design, and complexity analysis including integer overflow considerations.
Coding & AlgorithmsOnsite - SoFiMediumSoftware EngineerFind Kth Unique Maximum
This problem tests your ability to efficiently manage deduplication and order-statistics using hash maps or sorting techniques while handling multiple input collections.
Coding & AlgorithmsOnsiteHash MapSortingFrequency Count - SoFiMediumSoftware EngineerImplement tree ops and LRU cache
This question evaluates proficiency with tree-based mutable data structures and cache design, specifically maintaining aggregated state in a full binary tree after leaf updates and implementing an LRU cache supporting O(1) get/put operations.
Coding & AlgorithmsOnsite - SpokeoMediumData ScientistSolve Logic Puzzles: Algorithms and Proofs Required
This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Solve Logic Puzzles: Algorithms and Proofs Required states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsOnsite - SpotifyMediumMachine Learning EngineerJoin Tables and Rank Users
This question evaluates proficiency in SQL and data-engineering skills—specifically joins, aggregation and ranking via window functions, event deduplication, and query performance considerations across analytics tables.
Coding & AlgorithmsOnsite - SquareMediumSoftware EngineerBuild a Trust-Aware BIN Database
Build an in-memory card-prefix database that resolves brand and card type independently across overlapping writes. Practice combining longest-prefix matching with trust and recency rules while preserving omitted fields and supporting heavy lookup traffic.
Coding & AlgorithmsOnsite - SquarepointEasySoftware EngineerApply Insert, Update, and Remove Operations to a Keyed Store
Implement an in-memory key-value store processor that executes insert, update, and remove commands with strict handling for missing or duplicate keys, returning the final state in deterministic order.
Coding & AlgorithmsOnsiteHash MapDesignString - StackAdaptMediumMachine Learning EngineerRebuild a Binary Tree From Preorder and Inorder Sequences, Returned in Level Order
Reconstruct a binary tree with distinct values from its preorder and inorder traversals and return it in level-order form with null markers. Tests how the two traversal orders pin down structure, careful index bookkeeping, and efficient handling of deep, skewed trees.
Coding & AlgorithmsOnsite - Startups.ComMediumMachine Learning EngineerImplement common neural network layers in PyTorch
This question evaluates proficiency in implementing core neural-network primitives (ReLU, numerically-stable Softmax, LayerNorm, BatchNorm with running statistics, and RMSNorm), numerical stability and normalization concepts, and understanding of autograd-compatible tensor operations.
Coding & AlgorithmsOnsite