Design a Customer Revenue Index with Referrals and Threshold Queries

Last updated: August 24, 2026

Quick Overview

Design a system that manages customer revenue data while supporting referral tracking and querying for the lowest revenue customers above a specified threshold.

Databricks
Software Engineering Fundamentals
Software Engineer
Databricks
August 24, 2026
Software Engineer
Technical Screen
Software Engineering Fundamentals
Medium

6

0

98 solved


Design a system that manages customer revenue data while supporting referral tracking and querying for the lowest revenue customers above a specified threshold.

This question is typically asked in the technical screen round to evaluate a candidate's ability to design a scalable and efficient system. The interviewer is looking for a clear understanding of data structures, algorithms, and the ability to handle real-world scenarios involving customer data management and queries.

What the Interviewer Expects
  • Explain the requirements and functionalities of the system clearly.
  • Discuss the choice of data structures and algorithms for efficiency.
  • Provide a high-level design of the system architecture.
  • Detail the implementation of the key functions, especially focusing on performance.
  • Address potential trade-offs and scaling considerations.
Key Topics to Cover
Data Structures
Algorithms
System Design
Performance Optimization
Scalability
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How would you handle concurrent inserts and queries?
  • What would you do if the revenue data grows significantly?
  • Can you explain how you would test the system for edge cases?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

The system must support three main functions:

  1. insert(revenue) - inserts a new customer with an auto-incremented ID.
  2. insert(revenue, referrer) - inserts a new customer with a specified refe...
High-Level Design

To implement this system, we can use a combination of a hash map and a sorted data structure. The hash map will store customer data, including their revenue and referrer information. For the `get_lowe...


Submit Your Answer
Markdown supported

Related Questions