Sollicitatievraag bij Palantir Technologies

Describe an algorithm for finding a duplicate character in a string.

Antwoorden op sollicitatievragen

Anoniem

6 mei 2011

Consider time and space efficiency, and be prepared to describe using Big O notation.

Anoniem

27 mei 2015

brute force: check every character against the rest. time efficient: use some sort of map to keep track of seen characters. alt: if the character space is small, then use some type of bit vector.