@deepika this is a different question, your solution is great for removing
duplicate characters. original question is about removing duplicate words.

On Fri, Aug 5, 2011 at 7:06 PM, deepikaanand <swinyanand...@gmail.com>wrote:

> 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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

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

Reply via email to