PayPal Interview Question

Two coding questions - basic logic and arrays