Pergunta de entrevista da empresa Fluentgrid

To solve some puzzles,write some pseudo codes