Waymo interview question

DSA question that required graph traversal