Question d’entretien chez Siemens

How to remove duplicates from an array with minimum time complexity?

Réponse à la question d'entretien

Utilisateur anonyme

13 mars 2019

TryAdding the items in the dictionary , use a catch , the duplicate when it gets into an exception try { dict.Add(item, count); count++; } catch (Exception) { Console.WriteLine(item); }