Block interview question

String manipulation, graph problem, hashmap.