Levy Interview Question

completely bases on requirement