Yes Pramod you r right, Whatever i mentioned O(n log n) was using binary
tree. I did work out with larger input and it does generate the answer in
O(n log n)

On 5/8/07, pramod <[EMAIL PROTECTED]> wrote:
>
>
> Instead of arrays we can use BST to store the numbers, in which case
> this problem can be solved in O(n log n).
> Garcia, your algo is not O(n) as deleting an element in the array
> itself is O(n) and you are deleting n-1 array elements.
> I think better than O(n logn) is not possible but can't think of a
> proof.
>
>
> >
>

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

Reply via email to