Fidelity Investments interview question

Java Spring Boot Theory, leetcode easy