Pregunta de entrevista de Mystifly

Round 1: DSA medium questions, Java core concepts