Pergunta de entrevista da empresa Ingenuity Gaming

Coding question on string data structure.