0
0
LLDsystem_design~20 mins

Split strategies (equal, exact, percentage) in LLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Split Strategy Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1: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?
A$20
B$40
C$25
D$30
Attempts:
2 left
💡 Hint
Divide the total amount by the number of users.
Architecture
intermediate
1: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?
ACheck if the sum of all user amounts equals the total bill amount.
BCheck if each user amount is greater than zero.
CCheck if the number of users matches the number of amounts provided.
DCheck if the total bill amount is divisible by the number of users.
Attempts:
2 left
💡 Hint
The total of all exact amounts must match the bill.
scaling
advanced
2: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?
AStoring each user's percentage in a separate database table.
BEnsuring the sum of all percentages equals 100% to avoid rounding errors.
CAllowing users to change their percentage share in real-time without locking.
DCalculating each user's share by multiplying total bill with their percentage.
Attempts:
2 left
💡 Hint
Think about accuracy and consistency when dealing with many users.
tradeoff
advanced
2: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?
AEqual split is simplest but less flexible; exact split is precise but requires more input; percentage split balances flexibility and complexity.
BExact split is simplest and fastest; equal split requires complex calculations; percentage split is rarely used.
CPercentage split is always the most accurate; equal and exact splits cause errors.
DAll split strategies have the same complexity and accuracy.
Attempts:
2 left
💡 Hint
Consider user input complexity and flexibility.
estimation
expert
3: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?
AThe UI responsiveness when displaying the total bill amount.
BThe database schema used to store user profiles unrelated to payments.
CThe memory required to store all user percentage shares and the CPU time to calculate each share.
DThe network bandwidth to send the total bill amount to all users.
Attempts:
2 left
💡 Hint
Think about data size and computation for large user counts.