LLD - Design — Food Delivery SystemWhich of the following is a valid state transition in a typical order tracking state machine?AFrom 'delivered' to 'shipped'BFrom 'placed' to 'cancelled'CFrom 'cancelled' to 'processing'DFrom 'returned' to 'placed'Check Answer
Step-by-Step SolutionSolution:Step 1: Identify typical order states and transitionsOrders usually move forward: placed -> processing -> shipped -> delivered. Cancellation can happen after placing.Step 2: Check each optionFrom 'placed' to 'cancelled' is valid: an order can be cancelled after being placed. Other options reverse or skip states, which is invalid.Final Answer:From 'placed' to 'cancelled' -> Option BQuick Check:Valid order transition = placed to cancelled [OK]Quick Trick: Orders move forward or cancel, not backward [OK]Common Mistakes:MISTAKESAssuming orders can revert to earlier statesIgnoring cancellation as a valid transitionConfusing 'returned' with initial states
Master "Design — Food Delivery System" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Design — Chess Game - Special moves (castling, en passant) - Quiz 11easy Design — Chess Game - Move validation and check detection - Quiz 9hard Design — Hotel Booking System - Cancellation and refund policy - Quiz 12easy Design — Hotel Booking System - Availability checking - Quiz 14medium Design — Hotel Booking System - Cancellation and refund policy - Quiz 8hard Design — Online Shopping Cart - Payment strategy pattern - Quiz 2easy Design — Online Shopping Cart - Order state machine - Quiz 8hard Design — Splitwise (Expense Sharing) - Balance calculation algorithm - Quiz 3easy Design — Splitwise (Expense Sharing) - Balance calculation algorithm - Quiz 14medium Design — Splitwise (Expense Sharing) - User, Group, Expense classes - Quiz 6medium