Question d’entretien chez Booking.com

Classical BFS problem on matrix graph