Cisco Interview Question

Given a string, find and return the first non-duplicate character (i.e. abcdabde would return c)

Interview Answer

Anonymous

Nov 15, 2018

Iterate through the characters counting the number of times they appear and loading into a hash table. Iterate again through and return the first character with a count of 1.