1.

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 numberingI'm obligated to ask this question of Red Black Tree in portion Binary Trees of Data Structures & Algorithms IThis question was posed to me in homework.

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.


Discussion

No Comment Found

Related InterviewSolutions