Question d’entretien chez Zalando

Find out whether an array/string contains non-repeated characters.

Réponses aux questions d'entretien

Utilisateur anonyme

27 août 2013

Two solutions I gave 1. Make a bucket of ASCII (256),/ Eng Alphabet(26)characters.Look for count of A[i] . If 1 return false else return true in the end Loop if (!Memory[A[i]]) ) Increment (Count) else return false End return true 2. Create a Hashset/Hashtable. Look for A[i] . If found return false else return true in the end Loop if ! Get(A[i]) Push (A[i]) else return false End return true

Utilisateur anonyme

26 juil. 2014

the complxity of your solution will be O(n) runtime and O(n) memory you can do better