Pregunta de entrevista de PhonePe

Two coding questions were there in technical round