Bugs on red-black trees - Introduction to Algorithms
Found two bugs on RB-DELETE(T, z).
Line:7 p[x] <- p[y] should be if x != nil then p[x] <- p[y]
Line:16 if color[y] = BLACK should be if x != nil and color[y] = BLACK
Found two bugs on RB-DELETE(T, z).
Line:7 p[x] <- p[y] should be if x != nil then p[x] <- p[y]
Line:16 if color[y] = BLACK should be if x != nil and color[y] = BLACK