O(kN) where k is the length of the numbers which are assumed to be integers, so for even k = 100 it is O(N).
On Fri, Sep 9, 2011 at 4:27 PM, Pritpal Singh <[email protected]> wrote: > @Dave : Please specify reason for choosing radix sort ? > > > On Thu, Sep 8, 2011 at 7:02 AM, Sandy <[email protected]> wrote: > >> Thanks Dave, Piyush, and Bittursk. >> >> >> On Wed, Sep 7, 2011 at 2:48 PM, Dave <[email protected]> wrote: >> >>> @Sandy: It can be done in O(n) time with O(n) extra space by sorting >>> the data with a radix sort and then scanning the array for the element >>> you are seeking. >>> >>> Dave >>> >>> On Sep 7, 11:43 am, Sandy <[email protected]> wrote: >>> > You have an array in which every number is repeated odd number of times >>> > except one. Write a function to find that one element in O(n) time. >>> > >>> > -- >>> > >>> > *Sandeep Kumar,* >>> > ( Mobile +91-9866507368 >>> > >>> > *“I believe in smart work, Believe Me”* >>> >>> -- >>> 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. >>> >>> >> >> >> -- >> >> *Sandeep Kumar,* >> ( Mobile +91-9866507368 >> >> *“I believe in smart work, Believe Me”* >> >> >> -- >> 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. >> > > -- > 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. > -- 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.
