Ender (TX) interview question

Coding question about graph traversal