PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Coinbase

Count users over n connections

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to process dynamic graphs and maintain degree counts under a stream of relationship events, covering coding and algorithms, stream processing, and appropriate data structure selection for scalability.

  • Medium
  • Coinbase
  • Coding & Algorithms
  • Software Engineer

Count users over n connections

Company: Coinbase

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Given a stream of relationship events in the form [[user_a, user_b, op], ...], where op ∈ {"connect", "disconnect"}, treat connections as undirected edges. Process events in order, updating the current graph. After all events, return the count of users whose number of current connections is strictly greater than a given integer n. Specify and implement an efficient approach that handles up to 100,000 events and users appearing lazily.

Quick Answer: This question evaluates a candidate's ability to process dynamic graphs and maintain degree counts under a stream of relationship events, covering coding and algorithms, stream processing, and appropriate data structure selection for 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 7, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
4
0

Given a stream of relationship events in the form [[user_a, user_b, op], ...], where op ∈ {"connect", "disconnect"}, treat connections as undirected edges. Process events in order, updating the current graph. After all events, return the count of users whose number of current connections is strictly greater than a given integer n. Specify and implement an efficient approach that handles up to 100,000 events and users appearing lazily.

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.