How can you save memory when storing color information in Red-Black tree?

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
 
Answer: A
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.
 

Tìm kiếm

Back
Top