javascript-datastructures-algorithms icon indicating copy to clipboard operation
javascript-datastructures-algorithms copied to clipboard

Chapter 10: Possible error found within the code of method fixTreeProperties(node) on page 264

Open thinktinker opened this issue 6 years ago • 1 comments

The following while condition is not valid as method isRed() shouldn't be invokable through .color.

while (node && node.parent && node.parent.color.isRed() && node.color !== Colors.BLACK){ //rest of the code block in here }

By the way, I couldn't find the code for chapter 10's RedBlackTree and RedBlackNode anywhere in the downloaded code or in the git repo here. Please advise. Thank You.

thinktinker avatar Sep 15 '18 12:09 thinktinker

@thinktinker - thanks for opening the issue. I'll review it and get back to you!

loiane avatar Sep 16 '18 23:09 loiane