Challenge - 5 Problems
Split Strategy Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:00remaining
Understanding Equal Split Strategy
In a system that splits a bill equally among 4 users, each user pays the same amount. If the total bill is $120, how much does each user pay?
Attempts:
2 left
💡 Hint
Divide the total amount by the number of users.
✗ Incorrect
Equal split means dividing the total amount equally among all users. $120 divided by 4 users equals $30 each.
❓ Architecture
intermediate1:30remaining
Designing Exact Split Strategy Component
You need to design a component that handles exact split strategy where each user pays a specified amount. Which of the following is the best way to validate the input amounts before processing?
Attempts:
2 left
💡 Hint
The total of all exact amounts must match the bill.
✗ Incorrect
In exact split, the sum of all user amounts must equal the total bill to ensure correctness.
❓ scaling
advanced2:00remaining
Scaling Percentage Split Strategy for Large User Base
A system uses percentage split strategy to divide a bill among 10,000 users. Each user has a percentage share. What is the main challenge in scaling this system?
Attempts:
2 left
💡 Hint
Think about accuracy and consistency when dealing with many users.
✗ Incorrect
With many users, rounding errors can accumulate if percentages do not sum exactly to 100%, causing billing mismatches.
❓ tradeoff
advanced2:00remaining
Tradeoffs Between Split Strategies
Which of the following is a key tradeoff when choosing between equal, exact, and percentage split strategies in a payment system?
Attempts:
2 left
💡 Hint
Consider user input complexity and flexibility.
✗ Incorrect
Equal split is easy but inflexible. Exact split needs detailed input. Percentage split offers flexibility but requires careful validation.
❓ estimation
expert3:00remaining
Estimating System Capacity for Percentage Split Strategy
You are designing a system to handle percentage split payments for up to 1 million users per bill. Each user’s percentage share must be stored and processed. Which factor most impacts the system’s capacity and performance?
Attempts:
2 left
💡 Hint
Think about data size and computation for large user counts.
✗ Incorrect
Storing and processing 1 million percentage shares requires significant memory and CPU resources, impacting capacity and performance.