Meta interview question

String manipulation, graph connections