Pregunta de entrevista de Clio

Help the ruby engineer solve a basic search query problem and algorithm design using core ruby