On the Beach Interview Question

Online test at HackerRank about Graph algorithms