Pergunta de entrevista da empresa Bizongo

one question was of string and another was of optimizing time complexity