Pregunta de entrevista de Apna Mart

basic leetcode array and string manipulation question