Day–Stout–Warren Algorithm
   HOME





Day–Stout–Warren Algorithm
The Day–Stout–Warren (DSW) algorithm is a method for efficiently balancing binary search trees that is, decreasing their height to Big-O notation, O(log ''n'') nodes, where ''n'' is the total number of nodes. Unlike a self-balancing binary search tree, it does not do this incrementally during each operation, but periodically, so that its cost can be amortized analysis, amortized over many operations. The algorithm was designed by Quentin F. Stout and Bette Warren in a 1986 Communications of the ACM, ''CACM'' paper, based on work done by Colin Day in 1976. The algorithm requires linear (O(''n'')) time and is in-place algorithm, in-place. The original algorithm by Day generates as compact a tree as possible: all levels of the tree are completely full except possibly the bottom-most. It operates in two phases. First, the tree is turned into a linked list by means of an in-order traversal, reusing the pointers in the (Threaded binary tree, threaded) tree's nodes. A series of Tree ro ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Binary Search Tree
In computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a Rooted tree, rooted binary tree data structure with the key of each internal node being greater than all the keys in the respective node's left subtree and less than the ones in its right subtree. The time complexity of operations on the binary search tree is Time complexity#Linear time, linear with respect to the height of the tree. Binary search trees allow Binary search algorithm, binary search for fast lookup, addition, and removal of data items. Since the nodes in a BST are laid out so that each comparison skips about half of the remaining tree, the lookup performance is proportional to that of binary logarithm. BSTs were devised in the 1960s for the problem of efficient storage of labeled data and are attributed to Conway Berners-Lee and David_Wheeler_(computer_scientist), David Wheeler. The performance of a binary search tree is dependent on the order of insertion of the ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  



MORE