RazorpaySoftware Engineer · Online AssessmentCodemia practiceValidate Payment Lifecycle Event Streams Against a State Machine
Payments move through states such as created, authorized, captured, failed, refunded and partially refunded. Given an interleaved stream of (payment_id, new_state) events, return for each payment the index of the first illegal transition, or None if its history is valid.
Easy
Software Engineering Fundamentals