Rakuten Kobo Interview Question

Coding challenge was a graph problem with a 2d array