employer cover photo
employer logo
employer logo

Tata Consultancy Services

Fait partie de Tata Group

Est-ce votre entreprise ?

Question d’entretien chez Tata Consultancy Services

Describe an algorithm to find a duplicate integer, max number is n

Réponse à la question d'entretien

Utilisateur anonyme

21 févr. 2018

Create an array of size n that contains booleans, loop through integers setting the array at the value of the integer to true, checking each time if the value already is true. If it is, it is a duplicate