1

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.

Mirjan Pecenko
  • 101
  • 1
  • 7

1 Answers1

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