Deutsche Bank Interview Question

technically solve a scenario