Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
4951307 | Journal of Discrete Algorithms | 2017 | 14 Pages |
Abstract
In this paper, we are interested in the number of red nodes in red-black trees. We first present an O(n2logâ¡n) time dynamic programming solution for computing r(n), the largest number of red internal nodes in a red-black tree on n keys. Then the algorithm is improved to some O(logâ¡n) time recursive and nonrecursive algorithms. Based on these improved algorithms we finally find a closed-form solution of r(n).
Related Topics
Physical Sciences and Engineering
Computer Science
Computational Theory and Mathematics
Authors
Daxin Zhu, Yingjie Wu, Lei Wang, Xiaodong Wang,