Kodluyoruz Data Structures project3
The root is 7.
5 is smaller than 7, so should be to the left of the root.
1 is smaller than 7 and 5, so should be to the left of 5.
8 is bigger than 7, so should be to the right of the root.
3 is smaller than 7, so shoul be to the left of the root and bigger than 1. be to the right of 1.
6 is smaller than 7, so should be to the left of the root and bigger than 5. be to the right of 5.
0 is smaller than 7 , so should be to the left of the root.
9 is bigger than 7, so should be to the right of the root.
4 is smaller than 7, so should be to the left of the root and bigger than 1 and 3. be to the right of 3.
2 is smaller then 7, so should be to the left of the root and bigger than 1 and smaller than 3. be to the left of 3
7
/ \
5 8
/ \ \
1 6 9
/ \
0 3
/\
2 4