Forum : Unique Characters in a String
Brief description  about Online courses   join in Online courses
View Sucheta  Patra 's Profile

Unique Characters in a String

I m nt able to find the no of unique characters in a string.
Help me to do this.
Asked by Sucheta Patra | Apr 8, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Sucheta,

Hint: For this question, scan array input and make array position value=0 in initial stage, again loop if the same character occured increment the count. loop 0-255. finally, match which char position is equal to '1'... fetch that character and get the count. this will tell u the no. of unique characters in a string. Make use javascript ASCII functions.

Regards,
Team SiliconIndia
Apr 8, 2010