I would like to ask in which order should I add elements: 1,2,3,4,5,6,7, so that tree would be fully balanced and children of root node should be red.
Asked
Active
Viewed 84 times
1 Answers
0
The order should be 4,2,6,1,5,3,7.It is like you select the median of the whole set of keys and now from starting element to the median chosen, you select another median (say Median left) and from median to the end element you select a median(say median right). This process goes on recursively.

Karthick Balaji
- 64
- 2
- 14
-
1but the children of root node 2 and 6 are then black – Mirjan Pecenko Jan 06 '18 at 10:32
-
the root's children cannot be red in any case as the children of these children will be red in colour – Karthick Balaji Jan 06 '18 at 19:20