← Chime Interview Insights

Chime·Backend Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Chime backend interview that started with a classic LC problem and then kept stacking on follow-ups until I was basically designing a mini browser engine. The progression felt deliberate and a little exhausting.

Questions Asked (3)

Q1

Implement a BrowserHistory class that supports visiting a URL, going back a given number of steps, and going forward a given number of steps.

Algorithms & Data Structures
Author's notes

Pretty standard stuff if you've seen it before.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the requirements and edge cases first, then propose a doubly linked list with a current pointer for O(1) visit, back, and forward operations. Walk through the design, implement the methods, and analyze time and space complexity.

Pro tip: Mention that using a dynamic array with an index is simpler but can be O(n) for back/forward if you need to truncate history; a doubly linked list gives true O(1) for all operations. Also, explicitly handle edge cases like going back/forward beyond the available history.

1. Clarify requirements and edge cases

Ask about constraints: maximum steps, whether URLs are unique, and what happens when back/forward exceeds history. Confirm that visiting a new URL clears forward history.

2. Choose data structure

Propose a doubly linked list with a current node pointer. Explain why it supports O(1) visit, back, and forward, and how it handles truncation of forward history.

3. Design class and methods

Outline the BrowserHistory class with a constructor, visit(url), back(steps), and forward(steps). Describe how the current pointer moves and how new nodes are inserted.

4. Implement and test

Write clean code for each method, handling edge cases like steps larger than available history. Walk through a few test cases to verify correctness.

5. Analyze complexity

State that all operations are O(1) time and O(n) space for n visited URLs. Discuss trade-offs with alternative approaches like arrays.

Key Points to Mention

  • Doubly linked list with current pointer for O(1) operations
  • Visiting a new URL truncates forward history
  • Handling steps larger than available back/forward history
  • Time complexity: O(1) for visit, back, forward; space O(n)
  • Alternative: dynamic array with index, but back/forward may be O(n) if truncation needed
  • Edge cases: back/forward with 0 steps, empty history, multiple visits to same URL

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Add a haveVisited(url) method that returns whether a given URL has ever been visited across the entire history.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

My first instinct was to scan the history list linearly and I said it out loud before catching myself.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the requirements: what constitutes a visit, how URLs are normalized, and the expected scale. Then propose a data structure like a hash set for O(1) lookups, and discuss trade-offs such as memory usage, persistence, and concurrency. Finally, outline how you would implement and test the method.

Pro tip: Mention that you would normalize URLs (e.g., lowercase host, strip fragments) before storing to avoid false negatives, and consider using a Bloom filter if memory is constrained but accept false positives.

1. Clarify requirements

Ask about the definition of 'visited', URL normalization rules, expected scale, and whether the history is persistent or in-memory.

2. Choose data structure

Select a hash set for O(1) average-case lookups, or a Bloom filter for memory efficiency with probabilistic results.

3. Discuss trade-offs

Compare memory usage, lookup speed, persistence, and concurrency considerations for each option.

4. Outline implementation

Describe how to add URLs to the structure and implement haveVisited(url) with proper normalization.

5. Address testing and edge cases

Mention unit tests for normalization, concurrency, and large-scale scenarios.

Key Points to Mention

  • URL normalization (e.g., lowercase host, remove default ports, strip fragments)
  • Time complexity: O(1) average lookup with hash set
  • Space complexity: O(n) for exact storage, or O(1) with Bloom filter (but false positives)
  • Persistence: using a database or distributed cache for large-scale systems
  • Concurrency: thread-safe data structures or synchronization
  • Scalability: sharding or partitioning if the set grows very large

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Extend the design to support multiple browser tabs, where each tab has its own independent back/forward history but haveVisited checks across all tabs globally. Walk through your data structures and complexity.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

This is where it got interesting and also where I started rambling a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: each tab has its own back/forward history, but haveVisited is global across all tabs. Then propose a design with a global visited set (e.g., hash set) and per-tab history stacks (back and forward), explaining operations and complexity. Discuss trade-offs like memory usage and concurrency, and consider extensions like persistence or eviction.

Pro tip: Mention that the global visited set can be a concurrent data structure or sharded to handle high concurrency, and that per-tab histories can be stored in memory or persisted per tab session. Also, note that haveVisited should be O(1) on average, and back/forward operations should be O(1) amortized.

1. Clarify requirements and assumptions

Confirm that each tab maintains independent back/forward history, while haveVisited checks globally across all tabs. Assume operations: visit(url) adds to current tab's history and global visited set; back() and forward() navigate within the tab; haveVisited(url) checks global set.

2. Design data structures

Use a global hash set for visited URLs. For each tab, maintain two stacks: backStack and forwardStack. When visiting a new URL, push current URL to backStack, clear forwardStack, and add new URL to global set. Back() pops from backStack, pushes current to forwardStack, and sets current to popped URL. Forward() does the reverse.

3. Analyze complexity

All operations (visit, back, forward, haveVisited) are O(1) on average. Space complexity is O(total unique URLs visited) for the global set plus O(total history entries across tabs) for the stacks.

4. Discuss trade-offs and extensions

Consider memory growth: global set can grow unbounded; suggest eviction policies (e.g., LRU) or persistence. For concurrency, use thread-safe structures or locks. Also, consider if tabs can be closed and reopened, and whether history should persist across sessions.

Key Points to Mention

  • Global visited set: hash set for O(1) haveVisited, shared across all tabs.
  • Per-tab history: two stacks (back and forward) per tab for O(1) back/forward operations.
  • Visit operation: push current URL to back stack, clear forward stack, add new URL to global set.
  • Back/forward operations: move URLs between stacks, update current URL.
  • Complexity: O(1) time for all operations, O(N) space where N is total unique URLs and history entries.
  • Concurrency and memory management: thread-safe structures, eviction policies, or persistence for scalability.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.