A note on the largest number of red nodes in red-black trees

Abstract

In this paper, we are interested in the number of red nodes in red-black trees. We first present an O(n2 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( n) time recursive and nonrecursive algorithms. Based on these improved algorithms we finally find a closed-form solution of r(n).

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…