Pregunta de entrevista de Urbanpro

first recurring character. and other problem solving questions related to array and strings