Bird
0
0

In a test for Splitwise's financial logic, if a user owes $30 and pays $10, what should be the remaining debt?

medium📝 Analysis Q5 of 15
LLD - Design — Splitwise (Expense Sharing)
In a test for Splitwise's financial logic, if a user owes $30 and pays $10, what should be the remaining debt?
A$10
B$40
C$20
D$30
Step-by-Step Solution
Solution:
  1. Step 1: Identify the original debt and payment amount

    User owes $30 and pays $10.
  2. Step 2: Calculate remaining debt by subtracting payment from original debt

    30 - 10 = 20.
  3. Final Answer:

    $20 -> Option C
  4. Quick Check:

    30 - 10 = 20 [OK]
Quick Trick: Subtract payment from debt to find remaining amount [OK]
Common Mistakes:
  • Adding payment to debt instead of subtracting
  • Using payment amount as remaining debt

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes