How can you save memory when storing color information in Red-Black tree?
(a) using least significant bit of one of the pointers in the node for color information
(b) using another array with colors of each node
(c) storing color information in the node structure
(d) using negative and positive numbering
I’m obligated to ask this question of Red Black Tree in portion Binary Trees of Data Structures & Algorithms I
This question was posed to me in homework.
Correct choice is (a) using least significant bit of one of the pointers in the node for color information
Easiest explanation – The node pointers can be used to store color with the help of significant bits. the exceptions of this method are in languages like java where pointers are not used this may not work.