Booking.com Interview Question

Find Nth nearest neighbours in a graph.

Interview Answer

Anonymous

Mar 2, 2020

Do a BFS with tracking the depth. When it’s N - return whatever is in the queue. Haven’t checked, but should in that direction.

3