Amazon Interview Question

System design, OOPS, recursions, stack