zxpyld3x / rbtree

red-black tree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rbtree

a data container with red-black tree.

insert

insert a element into container, return 0 if success, otherwise -1

erase

erase a element from container, return 0 if success, otherwise -1

height

calculate the height of the tree

dump

dump data In order traversal

check_rb_feature_5

calculate the number of black nodes from the root to each of the binary tree leaf nodes

compile it and run sample

cmake .

make

./test

About

red-black tree


Languages

Language:C++ 97.5%Language:CMake 2.5%