Frage im Vorstellungsgespräch bei Google

Eliminate replicates in a string

Antwort im Vorstellungsgespräch

Anonym

30. Okt. 2012

create a hashmap loop through string check if character exists in hashmap if it does, it's a duplicate. remove from string if it doesn't put it in the hashmap.

1