Apple Interview Question

Java technical coding problem in coderpad