Pergunta de entrevista da empresa Surya Software

Puzzle questions were bit tricky