π Hi there! The description you are currently reading is just 4th part of the problem set. It is highly recommended to read ALL THE 4 PARTS before coding as parts may build on top of each other π³
Last month, we received the new Payment Intent system you built π, and merchants have been LOVING how simple it makes accepting payments. Congratulations π!
However, numerous merchants have requested that we augment our refund functionality by letting merchants specify a refund timeout policy: the amount of time after a payment succeeds that refunds are permitted. For example, one merchant, LlmaCorp, only wants to accept refunds within 15 days of a payment succeeding. Being able to return a llama afte 15 days would be absurd after all.
Let's add this functionality to our system, which means we will need to change the format of our commands to handle timing πͺ.
Timestamps
Merchant Refund Timeout Limit
π <timestamp> INIT <merchant_id> <starting_balance> <refund_time_out_limit>
π·ΰΌΒ·ΛCredit to Rachelα₯«α‘.
commands = ["1 INIT m1 0 5", "2 CREATE p1 m1 100", "3 CREATE p2 m1 50", "4 ATTEMPT p1", "5 ATTEMPT p2", "8 SUCCEED p1", "10 SUCCEED p2", "11 REFUND p1", "16 REFUND p2"] return = ["m1 50"]
π«Ά
- Request Routing SystemOA Β· Seen May 2026
- Email Log Processing, Grouping, and SortingOA Β· Seen May 2026
- Generate Available Time SlotsPHONE SCREEN Β· Seen Apr 2026
- Chat Billing CalculationSeen Mar 2026
- Process List of CommandsSeen Dec 2024
- Card Range Obfuscation Part 2 (ML Eng :)Seen Nov 2024
- Card Range Obfuscation Part 3 (ML Eng :)Seen Nov 2024
- Card Range Obfuscation Part 4 (ML Eng :)Seen Nov 2024
public String[] forAllIntentsAndPurposes4(String[] commands) {
// write your code here
}