Pregunta de entrevista de Deloitte

Coding question to print duplicates and bubble sort, logical question about directions.