ya an array of 256 is surely a wastage of space but this was i couls
think in my microsoft interview as the result should have also been i
place that is
i/p : AAA BBB CCC
o/p:A BC//space should also be removed
::explanantion
s[0] is alwayz unique therfor array[s[0]] = 1 => this char has already
occured
if the encountered s[i] has corresponding array[s[i]]==0 =>this char
has not occured yet
else
delete dat particular char at pos 'i' n decrement i

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to