Pergunta de entrevista da empresa Stable Money

gfg puzzles , Graphs DSA questions asked.