Snowflake coding interview

Round 3 of 5 · 30 questions reported

See the whole loop
Length
60 min
Format
Live coding; senior loops may agree a small storage component together, then build it

Questions Snowflake asks in this round 30

  • Group dependent tasks into parallel levelsCodingYou run a build system. Each task has a unique, non-empty lowercase name. Some tasks depend on others: a dependency before, after means before must finish before after can start…
    Last asked Aug 2026
  • Distance from every desk to its nearest bathroomCodingAn office floor plan is a grid of bathrooms, desks and open floor. For every desk, return how many steps (up, down, left, right) it takes to reach the closest bathroom. Expect…
    Last asked Jul 2026
  • Limit tree height by deleting nodesCodingYou are given a rooted N-ary tree. Every node has a unique integer id. The tree is passed as children: dictint, listint (a node with no entry has no children) together with the…
    Last asked Oct 2026
  • Four in a row: check a winning moveCodingTwo players, "a" and "b", play on a rectangular grid. board is a 2D list of strings; each cell is "a", "b", or "" (empty). Implement: move = (row, col) is the cell where player…
    Last asked Sep 2026
  • In-memory file system with files and foldersCodingImplement an in-memory file system with path-based file and folder access, plus follow-ups on per-directory limits, duplicate names and identical contents. Covers the bank's vault…
    Last asked Aug 2026
  • Rate limiter with multiple sliding-window rulesCodingBuild a rate limiter that enforces several rules at once. Each rule is a pair (limit, window): at most limit accepted requests may fall in any window of window time units. Use the…
    Last asked Aug 2026
  • Sliding-window request rate limiterCodingImplement a rate limiter that accepts at most limit requests in any window of ttl milliseconds. - allow(timestamp) is called once per incoming request. timestamp is in…
    Last asked Jun 2026
  • Key-value store with nested transaction rollbackCodingImplement an in-memory key-value store whose string keys map to string values. It supports transactions, and transactions can be nested. Implement the class KeyValueStore: -…
    Last asked Feb 2026
  • Longest substring without repeating charactersCodingReturn the length of the longest substring with no repeated character, with a sliding window that remembers the last index of each character.
    Possibly retired
  • Valid parenthesesCodingGiven a string of brackets (), and {}, decide whether every bracket is closed by the matching type in the right order.
    Possibly retired
  • Build reporting trees from employee-manager pairsCodingYou get a list of employee, manager pairs, where each person is a positive integer id and the pair means the employee reports directly to that manager. Build the org chart…
    Last asked Sep 2026
  • Insert, delete and get random in O(1) with duplicatesCodingDesign a collection of integers that allows duplicates and supports, each in average O(1) time: 1. insert(val): add one copy of val; return whether val was absent before. 2…
    Last asked Sep 2026
  • Maximum overlap of closed intervalsCodingGiven a list of closed intervals start, end (both endpoints included), return the largest number of intervals that contain one point on the number line. Two intervals that only…
    Last asked Sep 2026
  • Build and test a rate limiter with an AI assistantCodingIn a round where AI coding assistants are allowed, design and build a rate limiter from scratch. You choose the algorithm and the interface, use the assistant as you like, and…
    Last asked Sep 2026
  • Priority task executor with duplicate task idsCodingImplement an executor that accepts tasks, each with an id and a priority, and runs them highest priority first. The same task id can be submitted more than once. Decide and…
    Last asked Jun 2026
  • Grep with context linesCodingImplement a simplified grep. You get a list of text lines, a search string target, and a non-negative integer k. Return every line that contains target, together with up to k…
    Last asked Feb 2026
  • Live top-k best-selling books leaderboardCodingA bookstore wants a live leaderboard of its best-selling books. Sales arrive one at a time, and the leaderboard can be read at any moment. Implement a BookSalesTracker class: -…
    Last asked Feb 2026
  • Word search with a word search II follow-upCodingFind words on a letter grid by adjacent moves, then extend the solution to finding many words at once efficiently. Reported on 1point3acres' Glean bank; reconstructed in our own…
    Last asked Jan 2026
  • Fixed-capacity circular bufferCodingImplement a generic FIFO buffer with a fixed capacity, allocated once up front, with constant-time push and pop. Discuss how to signal full and empty and how the buffer would be…
    Last asked Jan 2026
  • Serialize and deserialize a trieCodingDesign and implement serialize and deserialize for a dictionary trie, so that the trie can be written to a string and rebuilt exactly, including which nodes mark the end of a…
    Possibly retired
  • Fill a weekly work schedule to an exact hour totalCodingA week's work plan is written as a 7-character string pattern, one character per day. A digit (0-9) is a day whose hours are already set. A ? is a day that is still open…
  • Guess the number with one-call delayed feedbackCodingA hidden integer secret lies in 1, n, inclusive. You can't read it. The only way to learn about it is a comparison service with one method: The service answers one call late. Each…
  • IP routing table with longest prefix matchCodingBuild the forwarding table of an IPv4 router. Routes are CIDR prefixes mapped to a next-hop name. When a packet arrives, the router must send it to the next hop of the most…
  • Key-value store with prefix searchCodingBuild an in-memory key-value store whose values can also be looked up by key prefix. Keys are strings and values are integers. Implement the KVStore class: - KVStore() creates an…
  • Longest subsequence with at most k value changesCodingYou get an integer array elements and a non-negative integer k. Choose a subsequence of elements: delete any number of items (possibly none) and keep the rest in their original…
  • LRU cache with runtime resizingCodingImplement a least recently used (LRU) cache whose capacity can change while it is in use. - get(key) returns the value for key, or -1 if it is not cached. A successful get makes…
  • Maximize pipeline throughput within a scaling budgetCodingA message pipeline has n services in series, and every message passes through all of them. The pipeline's throughput is therefore the minimum throughput of any service. You are…