Bird
0
0

Given a total amount of 120 and a percentage split {'A': 25, 'B': 75}, what is the amount user B should pay?

medium📝 Analysis Q4 of 15
LLD - Design — Splitwise (Expense Sharing)
Given a total amount of 120 and a percentage split {'A': 25, 'B': 75}, what is the amount user B should pay?
A30
B90
C75
D45
Step-by-Step Solution
Solution:
  1. Step 1: Calculate user B's share using percentage

    User B's percentage is 75%, so multiply 120 by 0.75 = 90.
  2. Step 2: Confirm calculation

    120 * 0.75 = 90, which is the amount user B pays.
  3. Final Answer:

    90 -> Option B
  4. Quick Check:

    Percentage split calculation = 90 [OK]
Quick Trick: Multiply total by percentage/100 for amount [OK]
Common Mistakes:
  • Using percentage as amount directly
  • Adding percentages instead of multiplying
  • Confusing user A and B percentages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes