Google interview question

Program on data structure and strings