Pregunta de entrevista de RBC

OA 3 questions, 1 Leetcode easy and two medium problems