LLD - Design — Splitwise (Expense Sharing)In a system with User, Group, and Expense classes, which class should track who paid for an expense?AGroup classBUser classCPayment classDExpense classCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify responsibility of Expense classExpense class represents costs and payments, so it should track who paid.Step 2: Exclude other classesUser class holds user info, Group class holds users, Payment class is not defined here.Final Answer:Expense class -> Option DQuick Check:Who paid expense = Expense class [OK]Quick Trick: Payment info belongs in Expense class [OK]Common Mistakes:Assigning payment info to User classConfusing Group class with payment trackingAssuming Payment class exists
Master "Design — Splitwise (Expense Sharing)" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Design — Chess Game - Board and piece hierarchy - Quiz 9hard Design — Chess Game - Board and piece hierarchy - Quiz 2easy Design — Hotel Booking System - Cancellation and refund policy - Quiz 15hard Design — Hotel Booking System - Search and filter design - Quiz 4medium Design — Hotel Booking System - Why booking tests availability and concurrency - Quiz 7medium Design — Hotel Booking System - Booking conflict resolution - Quiz 1easy Design — Online Shopping Cart - Notification on state change - Quiz 15hard Design — Online Shopping Cart - Notification on state change - Quiz 12easy Design — Splitwise (Expense Sharing) - Simplify debts algorithm - Quiz 15hard Design — Splitwise (Expense Sharing) - Split strategies (equal, exact, percentage) - Quiz 7medium