Meta Interview Question

string manipulation and graph traversal