Pergunta de entrevista da empresa Tally Solutions

DSA easy to medium level question