Meta interview question

String data structure question