binary tree and red-black variant