+1 vote
in Data Structures & Algorithms I by (110k points)
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.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...