@Anup: your method wont use extra memory. your solution is correct. But i think we can find better soultion. Duplicate means Not only it occured 2 times, it may be 2,3 4..etc.. so we have to consider that also. In that case complexity will go like O(N^2) , N= number of words in line....
Thanks Venkat. On Aug 25, 8:45 am, ghat...@gmail.com wrote: > @Ankur Garg: Please explain to me how my method uses extra memory? -- 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.