I want to write an efficient function to find first non-repeated character in a string. For instance, the non repeated character in "total" is 'o' and the first non repeated character in "teeter" is 'r'.
Tushar.
I want to write an efficient function to find first non-repeated character in a string. For instance, the non repeated character in "total" is 'o' and the first non repeated character in "teeter" is 'r'.
Tushar.
I want to do this using hash tables....
Thanks for stating what you want, but how about asking a question?
Please note the forum policy on homework.
Note, following up with "this is not homework" is not convincing. Have you come with an idea on how to approach the problem? Let's see your code?
You say you want an efficient function, why not write a version that you think is inefficient, and ask for suggestions for improvement.
What, you mean try something on your own?! That's just CrAzY TaLk!
Quzah.
Hope is the first step on the road to disappointment.