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"]
π«Ά
- Account Balance Manager Part 3 - Platform CoverageONSITE INTERVIEW Β· Seen Jun 2026
- BitFont Part 3 - Decode Run-Length-Encoded RowsONSITE INTERVIEW Β· Seen Jun 2026
- Record Linkage Part 3 - Full Connected ComponentPHONE SCREEN Β· Seen Jun 2026
- Shipping Cost Calculator Part 3 - Mixed Fixed/Incremental TiersONSITE INTERVIEW Β· Seen Jun 2026
- Transaction Fee Calculator - Per-Merchant Volume DiscountPHONE SCREEN Β· Seen Jun 2026
- Account Balance Manager Part 2 - Reject OverdraftsONSITE INTERVIEW Β· Seen Jun 2026
- BitFont Part 2 - Render a WordONSITE INTERVIEW Β· Seen Jun 2026
- Factory Cost - Min-Cost Path Skipping One StagePHONE SCREEN Β· Seen Jun 2026
public String[] forAllIntentsAndPurposes2(String[] commands) {
// write your code here
}