PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Dropbox

Implement KV Store and Token Bucket

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's skills in implementing core data structures and concurrent algorithms, specifically in-memory key-value store design, API considerations, time-based token-bucket rate limiting, thread-safety, and synchronization.

  • medium
  • Dropbox
  • Coding & Algorithms
  • Software Engineer

Implement KV Store and Token Bucket

Company: Dropbox

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

The coding portion covered two implementation tasks: 1. Implement a simple in-memory key-value store. Support basic operations such as: - `put(key, value)`: insert or update a value - `get(key)`: return the current value or indicate that the key does not exist - `delete(key)`: remove a key Be prepared to discuss API design, edge cases, and expected time complexity. 2. Implement a concurrent token-bucket rate limiter. The bucket has: - a fixed maximum capacity - a refill rate of `r` tokens per second - an operation such as `allow(n)` that consumes `n` tokens if enough tokens are available, otherwise rejects the request Your implementation should be thread-safe under concurrent callers, refill tokens based on elapsed time, and never allow the token count to exceed capacity. Explain your synchronization strategy and complexity.

Quick Answer: This question evaluates a candidate's skills in implementing core data structures and concurrent algorithms, specifically in-memory key-value store design, API considerations, time-based token-bucket rate limiting, thread-safety, and synchronization.

Related Interview Questions

  • Compute worst-case guesses for adaptive hangman - Dropbox (medium)
  • Return all files under a path - Dropbox (medium)
  • Build a hit/miss word guessing game - Dropbox (medium)
  • Implement feedback for word guessing game - Dropbox (medium)
  • Implement hierarchical folder access check - Dropbox (medium)
Dropbox logo
Dropbox
Oct 3, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
6
0
Loading...

The coding portion covered two implementation tasks:

  1. Implement a simple in-memory key-value store. Support basic operations such as:
  • put(key, value) : insert or update a value
  • get(key) : return the current value or indicate that the key does not exist
  • delete(key) : remove a key

Be prepared to discuss API design, edge cases, and expected time complexity.

  1. Implement a concurrent token-bucket rate limiter. The bucket has:
  • a fixed maximum capacity
  • a refill rate of r tokens per second
  • an operation such as allow(n) that consumes n tokens if enough tokens are available, otherwise rejects the request

Your implementation should be thread-safe under concurrent callers, refill tokens based on elapsed time, and never allow the token count to exceed capacity. Explain your synchronization strategy and complexity.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

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

Master your tech interviews with 8,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.