LinkedIn interview question

Simple string manipulation Flatten data structure