Deutsche Bank Interview Question

Easy to medium