Build a binary search tree for the following list of countries, sorting them by population. Add countries to this tree in the order in which they are listed. Country Population Philippines 108 Vietnam 96 Bangladesh 163 65 France Mexico 128 Germany 84 Tanzania 58 Nigeria 201 Russia 146 Italy 61 (a) What is the parent node of Tanzania? Philippines Vietnam Bangladesh France O Mexico Germany Tanzania Nigeria Russia O Italy (b) How many children does the Mexico node have? (c) How many comparisons are needed to locate Nigeria in this tree, starting from the top?

icon
Related questions
Question

Please circle the answer and show how to do it? (BIC 7)

Build a binary search tree for the following list of countries, sorting them by population. Add countries to
this tree in the order in which they are listed.
Country Population
Philippines 108
Vietnam
96
Bangladesh 163
65
France
Mexico
128
Germany 84
Tanzania 58
Nigeria 201
Russia
146
Italy
61
(a) What is the parent node of Tanzania?
O Philippines
Vietnam
Bangladesh
France
O Mexico
Germany
Tanzania
Nigeria
Russia
O Italy
(b) How many children does the Mexico node have?
(c) How many comparisons are needed to locate Nigeria in this tree, starting from the top?
Transcribed Image Text:Build a binary search tree for the following list of countries, sorting them by population. Add countries to this tree in the order in which they are listed. Country Population Philippines 108 Vietnam 96 Bangladesh 163 65 France Mexico 128 Germany 84 Tanzania 58 Nigeria 201 Russia 146 Italy 61 (a) What is the parent node of Tanzania? O Philippines Vietnam Bangladesh France O Mexico Germany Tanzania Nigeria Russia O Italy (b) How many children does the Mexico node have? (c) How many comparisons are needed to locate Nigeria in this tree, starting from the top?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer