You can use a hash map. What do u mean by preserving order?

Keep inserting the characters into hash, whenever u find a duplicate,
delete it. The order is maintained still. Can you please elaborate on
what is mean by preserving order?

On Sep 8, 10:47 am, yash <yashpal.j...@gmail.com> wrote:
> wap a program in efficient manner to remove all occurrence of
> duplicate character in the word and all occurrence of duplicate word
> in the file.
>
> i break the problem in two section( this is my approach it may be
> better one )
>
> wap to remove all duplicate character in the word. (order is important)
> [i don't know which DS we use for this program your suggestion has
> highly appreciated]
> wap to remove all duplicate word in the file. (order is important)[we
> use tries to remove all duplicate word in the file]
>
> input in file
>
> we welcome your feedback, suggestions comment to make better your
> world
>
> After run the above compression algo output will be
>
> we welcom your fedback, sugtion coment to make betr world
>
> --
> Kind Regards
>   ^_^
> Yashpal Jain
> Software Developer-IDC Risk
> PayPal - an ebay company

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to