Bank Account Ledger

Programming Interview Medium 9 views
Back to Questions

Problem Description

Simulate one bank account. Start balance = 0. Commands: DEPOSIT x, WITHDRAW x, FEE x. WITHDRAW fails if balance

Input Format

See description.

Output Format

See description.

Sample Test Case

Input:
5 DEPOSIT 100 WITHDRAW 30 WITHDRAW 100 FEE 10 WITHDRAW 20
Output:
40 1

Constraints

Total operations up to 200000.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next