Re: printing nodes of a bst using the min heap property?
From: Richard Harter (cri_at_tiac.net)
Date: 10/15/04
- Next message: MrPepper11: "Say goodbye to the American software programmer"
- Previous message: Willem: "Re: printing nodes of a bst using the min heap property?"
- In reply to: Willem: "Re: printing nodes of a bst using the min heap property?"
- Next in thread: CBFalconer: "Re: printing nodes of a bst using the min heap property?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 15 Oct 2004 10:28:06 GMT
On Fri, 15 Oct 2004 09:23:55 +0000 (UTC), Willem <willem@stack.nl>
wrote:
>CBFalconer wrote:
>) <snip: discussion about printing the leaves of a BST in sorted order>
>)
>) Sorting takes O(NlnN). Heaping doesn't.
>
>As a completely off-the mark tangent:
>
>You can sort an array by inserting all the items into a binary search
>tree, and then traversing the tree. How fast would such an algorithm
>be, compared to the more traditional sorting methods ?
Oddly enough, it has much the same properties as quicksort, albeit
somewhat slower because of the greater complexity of the logic.
- Next message: MrPepper11: "Say goodbye to the American software programmer"
- Previous message: Willem: "Re: printing nodes of a bst using the min heap property?"
- In reply to: Willem: "Re: printing nodes of a bst using the min heap property?"
- Next in thread: CBFalconer: "Re: printing nodes of a bst using the min heap property?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|