Pregunta de entrevista de Capgemini

Given an array of repeating numbers , find the first two repeating numbers.

Respuesta de la entrevista

Anónimo

7 abr 2025

While I was trying to write a solution, the interviewer said "use set". I disagreed because if there is a non-repeating number, set will hold that number too. Even though sets do not allow duplicate values, it is not a reliable solution for thisscenario.