use array element as index in linear traversal and der index pointing value as negative when u wll get pointing value negative mean that array index position is 1st repeated element.
On Wed, Jul 7, 2010 at 10:18 AM, Anil C R <cr.a...@gmail.com> wrote: > do you need an algorithm which is O(1) in space? if not it's trivial. > Anil > > > > On Tue, Jul 6, 2010 at 7:29 PM, sharad kumar <sharad20073...@gmail.com>wrote: > >> Given an array of n numbers in which all the members are less than or >> equal to k (k<n). device an algorithm of order O(k) to find the first >> repeating element >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Thanks & Regards Umesh kewat -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@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.