PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Coinbase

Compute top-K branches by openings

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of streaming data processing, aggregation and ranking at scale, algorithmic complexity, and system-design concerns such as handling late or out-of-order events and distributed scalability.

  • Medium
  • Coinbase
  • Coding & Algorithms
  • Software Engineer

Compute top-K branches by openings

Company: Coinbase

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Take-home Project

Given a stream of account-opening events (branch_id, user_id, timestamp), design algorithms and data structures to compute the top-K branches by number of openings for (a) all time and (b) a sliding window of the last T minutes. Support event ingestion in near real time, queries at any time, and updates in O(log K) or better. Address late or out-of-order events, memory usage, and trade-offs between exact and approximate methods (e.g., heaps + hash maps vs. sketches). Extend your design to a distributed environment and analyze time and space complexity.

Quick Answer: This question evaluates understanding of streaming data processing, aggregation and ranking at scale, algorithmic complexity, and system-design concerns such as handling late or out-of-order events and distributed scalability.

Related Interview Questions

  • Implement an In-Memory Database - Coinbase (hard)
  • Implement a Coin-Constrained Jump Strategy - Coinbase (hard)
  • Implement Game Physics and Block Mining - Coinbase (hard)
  • Compute Total Manual Distance - Coinbase (medium)
  • Implement a Flappy Bird Jump Agent - Coinbase
Coinbase logo
Coinbase
Aug 8, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
3
0

Given a stream of account-opening events (branch_id, user_id, timestamp), design algorithms and data structures to compute the top-K branches by number of openings for (a) all time and (b) a sliding window of the last T minutes. Support event ingestion in near real time, queries at any time, and updates in O(log K) or better. Address late or out-of-order events, memory usage, and trade-offs between exact and approximate methods (e.g., heaps + hash maps vs. sketches). Extend your design to a distributed environment and analyze time and space complexity.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Coinbase•More Software Engineer•Coinbase Software Engineer•Coinbase Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.