0

I have been going through the book, and in this section

http://clrs.skanev.com/10/04/01.html

I dont get why the 4 is left of 12, and the 7 is right. I understand that the left needs to be smaller than the right child node, but the array says otherwise.

Trt Trt
  • 5,330
  • 13
  • 53
  • 86
  • 2
    Please include a relevant snippet so that all the information to answer this question is in the description. That link might not be up there forever. – Jochen van Wylick Jul 17 '15 at 07:43
  • 2
    Are you sure it's a binary *search* tree? You can have a binary tree whose nodes' values don't have any invariants. – Ami Tavory Jul 17 '15 at 07:46
  • Can you please take a look https://stackoverflow.com/questions/71178163/clrs-solution-seems-meaningless-as-one-line-make-me-skeptical – Encipher Feb 19 '22 at 00:15

1 Answers1

1

I think you are right, the 4 and 7 are inverted, might juste be an error in the book it happens.

Jusanne
  • 115
  • 11