Pregunta de entrevista de Carelon

Couple of Leet code questions in Java and angular