Meta interview question

Some string manipulations with hash maps, and big O complexity