JPMorganChase interview question

Typicall SD question and as standard coding problem.