Lyft Interview Question

Tree path question, some graph BFS. Pretty simple stuff.