Path to binary search tree (at best)

I am currently studying an exam, and one of the questions I am confused about is this:

Give 5 orders of the AXCSERH key, which when inserted into the original empty BST will create the best case tree. Assume lexicographic / alphabetical ordering.

The answer to this question is provided as:

Here are some possible options ...

HCAESRX

HCAESXR

Hceasrx

Hceasxr

HCESARX

I was wondering if someone can give me an explanation of how the "H" will take over the root of the node? From my current understanding, I assumed that "A" would be the root. I think I need some clarification on how to get to the best BST tree. If anyone can help me figure this out, I would really appreciate it.

+4
2

. , ( ), ; .

, .

enter image description here

, , ( , ),

+9

A node, , , . , , node , , .

+3

Source: https://habr.com/ru/post/1543990/


All Articles