Bird
0
0

Given the transactions [+100, -50, +25] and initial balance 200, what is the final balance after applying the balance calculation algorithm?

medium📝 Analysis Q4 of 15
LLD - Design — Splitwise (Expense Sharing)
Given the transactions [+100, -50, +25] and initial balance 200, what is the final balance after applying the balance calculation algorithm?
A225
B175
C250
D275
Step-by-Step Solution
Solution:
  1. Step 1: Sum the transactions

    Calculate total transactions: 100 - 50 + 25 = 75.
  2. Step 2: Add to initial balance

    Initial balance 200 + 75 = 275 final balance.
  3. Final Answer:

    275 -> Option D
  4. Quick Check:

    Final balance = 275 [OK]
Quick Trick: Add all transactions to initial balance [OK]
Common Mistakes:
  • Subtracting instead of adding transactions
  • Ignoring negative signs
  • Adding only first transaction

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes