Fidelity Investments interview question

Can you solve a leet code