Use Quick sort to sort the characters of a string (qsort is inplace sorting ) then check for consecutive characters in the array, if they are same then the string is not unique else unique .(use builtin qsort in C .) No additional data structure is used ... What do u think of this guys ??
On Sat, Jul 23, 2011 at 9:52 AM, Reynald <[email protected]> wrote: > Implement an algorithm to determine if a string has all unique > characters. What if you can not use additional data structures? > > -- > 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. > > -- Regards Rajeev N B <http://www.opensourcemania.co.cc> -- 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.
