an example

array  35,36,37,36,37,38,39,40,39,40,41,42,43,42   etc

array need not to be sorted.

the  complexity of Dave algo is O(N) in worst case , when element is not
present in the array.m i right Dave

On Tue, Aug 30, 2011 at 11:02 AM, Anup Ghatage <ghat...@gmail.com> wrote:

> @tech
> Could you give an example for this?
> If I've understood the question correctly, if we are not allowed duplicates
> in the array the array turns out to be sorted.
> If we are allowed duplicates, do we return the first occurrence ?
>
> @Dave
> What would be the complexity of your solution?
>
>  --
> 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.
>

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

Reply via email to