## Binary Tree management
A C program that manages country information using a binary tree data structure. It allows insertion, in-order display, height and depth calculations, and more.
- Insert country data (name, capital, area, etc.)
- Calculate tree depth
- Calculate node depth (based on number of cities)
- Calculate node depth (based on number of cities)
- Calculate node height (based on area)
- Display all tree leaves
- Free memory
In order to check if the program works correctly, I introduced information about 3 countries

-
The result of choosing the first option from the meniu - Calculate tree depth

-
The result of choosing the second option of the menu - Search for a node by key (foundation year)

-
For the same contries entered above, we have the result of the third option of the menu - Calculate node depth (based on number of cities)
-
The result of the fourth option of the menu - Calculate node height (based on area)

-
The result of the fifth option of the menu - Display all tree leaves.

Explanation of the result: The binary tree is built based on the area. The first node inserted is Moldova, which becomes the root. The second node is Romania. Its area is compared with Moldova’s (238397 > 33843), so it is inserted to the right of the root. The third node is Germany. Its area is compared with Moldova’s (357022 > 33843), so it goes to the right of the root, where Romania is already placed. Then, Germany’s area is compared with Romania’s (357022 > 238397), so it is inserted to the right of Romania.
The tree looks like this:
Moldova
\
Romania
\
Germania
- C
