Good solution by Dave.
Karthik R,
RD Engineer,
Tejas Networks.
On Tue, Aug 30, 2011 at 11:23 AM, Anup Ghatage ghat...@gmail.com wrote:
@Dave Your algo's average case working should be better than a naive O(n)..
--
Anup Ghatage
--
You received this message because you are subscribed to
@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
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
@Dave Your algo's average case working should be better than a naive O(n)..
--
Anup Ghatage
--
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