Pregunta de entrevista de PI-Labs

DSA based , Logic behind answers