← Back to blog Snowflake Full Loop: Phone to Onsite, Infra Focus
Snowflake

Snowflake Full Loop: Phone to Onsite, Infra Focus

2026-07-16

Where many companies test "can you write this problem," Snowflake feels more like "can you build a system end to end and make it solid." This post walks the full loop: from two phone screens through four Virtual Onsite rounds, spelling out what each round tests, where the interviewer's attention goes, and one recurring theme - engineering completeness. Each problem gets a light breakdown so we can spend more space on the round that separates candidates the most: preparing for the system-design round. If you are aiming at Infra or data-infrastructure teams, this maps directly to you.

1. The full loop at a glance

Snowflake's SWE loop is two phone screens + four onsite rounds - tightly paced and finely graded. Here is the overall shape:

Stage Round Length Content Focus
Phone R1 pure coding 1h LRU Cache (Data Infra team) O(1) implementation + pointer ops
Phone R2 pure coding 1h Range Module (simplified segment tree) interval merging + corner cases
Onsite R1 coding 1h sliding-window most frequent efficient updates, no re-scan
Onsite R2 coding 1h interval merging with frequency line sweep + boundary definition
Onsite R3 BQ 1h disagreement / technical tradeoff judgment under ambiguity
Onsite R4 system design 1h Log Ingestion Service Infra down to implementation

One grading thread runs through all of it: interviewers are not satisfied with "it runs" - they want to see you proactively cover edge cases and justify your data-structure choices. That is the Snowflake Infra flavor.

2. Phone R1: LRU Cache (light breakdown)

The first round comes from a Data Infra team interviewer, a relaxed one, with the classic LRU Cache: implement get and put, both O(1).

The idea is two sentences: a hashmap for O(1) lookup, a doubly linked list for access order. Every access moves the node to the front; when capacity is exceeded, drop the tail node. What the interviewer actually watches is the node-update logic and the pointer operations on delete - unlink first, relink cleanly, do not lose references. That stretch is the scoring point.

class Node:
    def __init__(self, key=0, val=0):
        self.key, self.val = key, val
        self.prev = self.next = None

class LRUCache:
    def __init__(self, capacity: int):
        self.cap = capacity
        self.map = {}                       # key -> Node
        # sentinels: after head is most-recently-used, before tail is least
        self.head, self.tail = Node(), Node()
        self.head.next, self.tail.prev = self.tail, self.head

    def _remove(self, node):
        node.prev.next, node.next.prev = node.next, node.prev

    def _add_front(self, node):
        node.prev, node.next = self.head, self.head.next
        self.head.next.prev = node
        self.head.next = node

    def get(self, key: int) -> int:
        if key not in self.map:
            return -1
        node = self.map[key]
        self._remove(node)                  # unlink first
        self._add_front(node)               # then move to front
        return node.val

    def put(self, key: int, value: int) -> None:
        if key in self.map:
            self._remove(self.map[key])
        node = Node(key, value)
        self.map[key] = node
        self._add_front(node)
        if len(self.map) > self.cap:
            lru = self.tail.prev            # least recently used
            self._remove(lru)
            del self.map[lru.key]

Time complexity: get / put both O(1); space complexity: O(capacity).

3. Phone R2: Range Module (light breakdown)

The second round is Range Module, essentially a simplified segment tree: implement addRange, queryRange, and removeRange, maintaining a set of disjoint intervals.

Storing intervals in a TreeMap (ordered map) is the cleanest approach: on insert you probe the left and right neighbors to merge; on remove you may split one interval into two. The interviewer will probe the complexity of each TreeMap operation plus two frequent corner cases: an insert overlapping an existing interval, and a remove landing in the middle of one. Python has no built-in TreeMap, so sortedcontainers.SortedDict expresses the same semantics; the key in a live interview is explaining the "floor / ceiling lookup for neighbors" clearly.

Discussion focus: walk the "merge" and "split" paths separately, and proactively state how you handle overlapping, containing, and adjacent relationships - that scores better than silently finishing.

4. Onsite R1: sliding-window most frequent (full code)

Given an int array and window size k, return the most frequent element in each window. It must be efficient - no re-scanning the whole window each time.

Idea: a hashmap for counts + a max-heap for the mode, where the heap stores frequency snapshots and uses lazy deletion to skip stale entries - which is exactly what the interviewer keeps probing: how do you efficiently handle elements no longer in the window.

import heapq
from collections import defaultdict

def sliding_window_most_frequent(nums, k):
    freq = defaultdict(int)
    heap = []                               # (-count, value) max-heap
    res = []
    for i, x in enumerate(nums):
        freq[x] += 1
        heapq.heappush(heap, (-freq[x], x)) # push current frequency snapshot
        if i >= k - 1:
            # lazy deletion: drop the top if its snapshot is stale
            while -heap[0][0] != freq[heap[0][1]]:
                heapq.heappop(heap)
            res.append(heap[0][1])
            left = nums[i - k + 1]          # element leaving the window
            freq[left] -= 1
    return res

# quick self-check
if __name__ == "__main__":
    print(sliding_window_most_frequent([1, 3, 3, 2, 1, 1], 3))  # [3, 3, 1, 1]

Discussion focus: why not rebuild the heap per window (O(nk)) but amortize with lazy deletion; stale entries may pile up, yet each is popped at most once, so it stays bounded. Time complexity: O(n log n); space complexity: O(n).

5. Onsite R2: interval merging with frequency (light breakdown)

Intervals may overlap multiple times; output the merged intervals plus the frequency of each segment.

The idea is line sweep: split each interval into a start (+1) and an end (-1) event, sort, then scan while maintaining an active count that is the segment frequency. The real trap is the boundary definition: at the same coordinate, which is processed first - a start or an end - and is the interval inclusive. Align both with the interviewer before writing.

def merge_intervals_with_freq(intervals):
    events = []
    for s, e in intervals:
        events.append((s, 1))               # entering: frequency +1
        events.append((e, -1))              # leaving: frequency -1
    events.sort()
    res, active, prev = [], 0, None
    for pos, delta in events:
        if prev is not None and pos > prev and active > 0:
            res.append((prev, pos, active)) # frequency over [prev, pos)
        active += delta
        prev = pos
    return res

Discussion focus: state the ordering of -1 vs +1 at the same coordinate (it decides whether touching endpoints count as overlap). Time complexity: O(n log n); space complexity: O(n).

6. Onsite R3: BQ round notes

The BQ leans on judgment and collaboration, with very typical prompts:

I told a story from an async data-processing system about trading batch latency vs resource utilization: why, at a certain data volume, I chose larger batches and gave up a bit of latency to gain throughput. Snowflake cares whether you can give a reasoned judgment under ambiguity, not recite a canned answer.

7. Onsite R4: system design - Log Ingestion Service

Design a simplified log ingestion service supporting high-throughput ingest, durable storage, and queries for the most recent N logs.

This round shows Snowflake's Infra core the clearest. The interviewer does not want a few high-level boxes; they want a concrete plan that reaches implementation:

Layer Choice Role
Ingress Load Balancer spread write load, scale horizontally
Buffer Kafka / custom ring buffer absorb spikes, decouple ingest from storage
Storage S3 (durable) + RocksDB (index) persistence + fast point lookups
Query time-based index accelerate "recent N" retrieval

The follow-ups pile on: log dedup, out-of-order handling, consistency tradeoffs. The whole conversation tests your grasp of system bottlenecks - where the write hotspot is, whether the index becomes a memory bottleneck, how you trade query latency against consistency. This is where the loop separates candidates the most, so here is a dedicated checklist.

8. How to prep the system-design round specifically

System design is the round Snowflake (especially Infra) weighs most and the one most often walked into cold. These points keep your direction steady:

9. Summary: what Snowflake is really testing

In one line - engineering completeness plus the ability to express system-design tradeoffs. The coding problems are not the hardest, but the interviewer will push edge cases, pointers, complexity, and choice rationale to the end; system design demands you reach implementation and name the bottlenecks. Practice LRU / Range Module / sliding window / line sweep until you can explain "why this choice," then prepare the system-design round as an "Infra-implementation" version, and the whole loop steadies.


FAQ

Q1: What is Snowflake's full interview loop?

Two phone screens (1 hour each, pure coding) + four Virtual Onsite rounds (two coding + one BQ + one system design). It leans Infra, and the grading core is completeness of engineering implementation.

Q2: How hard is Snowflake coding?

The problems (LRU, Range Module, sliding window, line sweep) are medium-to-hard, but the real differentiator is detail: how lazy deletion skips stale elements, the complexity of each TreeMap operation, splitting on interval removal, event ordering in line sweep - the interviewer probes all of it.

Q3: What is the easiest trap to fall into on the system-design round?

Stopping at a high-level box diagram without drilling to implementation. For log ingestion, be able to expand the buffer (Kafka / ring buffer), storage (S3 + RocksDB), and index (time-based), and proactively discuss dedup, out-of-order, and consistency tradeoffs while naming the bottlenecks.

Q4: How is this different from the other Snowflake onsite writeup?

That one goes deep on a few problems' solutions; this one walks the full loop (phone to onsite, round by round) with a light take on each problem, focusing on Snowflake's engineering-completeness bar and dedicated system-design prep - good for building the big-picture view first.

Q5: How do I prep efficiently for a Snowflake VO?

Practice high-frequency data-structure problems until you can justify your choices, prepare "technical tradeoff" stories for the BQ, and build an Infra-implementation version of your system design. For timed mocks on real problems, one-on-one system-design walkthroughs, or real-time VO support / VO proxy, send the job description first so we can predict the question types and plan your practice.


Preparing for the full Snowflake loop?

Snowflake tests engineering completeness + Infra system design + tradeoff articulation. oavoservice offers full-loop VO practice for Snowflake / data-infrastructure roles: timed mocks on high-frequency phone questions, one-on-one log-ingestion system-design walkthroughs, and BQ tradeoff-story polishing, with real-time VO support / VO proxy available. Our coaches include former big-tech Infra engineers familiar with Snowflake's "dig into implementation detail" grading style.

Add WeChat Coding0201 now to get Snowflake full-loop problems and practice.

Contact