For All Intents And Purposes Part 2 - Change Is Good! π
See Stripe hiring insights
π Hi there! The description you are currently reading is just 2nd part of the problem set. It is highly recommended to read ALL THE PARTS before coding as parts may build on top of each other π³
The initial version of our system looks good ππ! But it turns out merchants also need to be able to update the amount of initialized Payment Intents. This happen if a customer begins to check out but then decides to change the items in their shopping cart π and thus the amount of the payment. Let's add that the our system π»!
Commands
Your system should support an additional command for updaing a Payment Intent.
UPDATE <payment_intent_id> <new amount>
qοΎβ’βκ°α π§‘ Credit to Rachel π§‘ΰ»κ±β⒠qοΎ
commands = ["INIT m1 0", "CREATE p1 m1 50", "UPDATE p1 100", "ATTEMPT p1", "SUCCEED p1"] return = ["m1 100"]
π«Ά
- Count Valid Bitwise PairsOA Β· Seen Jun 2026
- 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
public String[] forAllIntentsAndPurposes2(String[] commands) {
// write your code here
}