Further suppose that:
Which data structure would you choose to implement this search application? Justify your answer and be specific about which type of binary tree (balanced versus unbalanced), hash table (separate chaining versus open addressing), or linked list (singly-linked versus doubly-linked) you would use.
-----------------------
0 | |
| |
-----------------------
1 | |
| |
-----------------------
2 | |
| |
-----------------------
3 | |
| |
-----------------------
4 | |
| |
-----------------------
5 | |
| |
-----------------------
6 | |
| |
-----------------------
7 | |
| |
-----------------------
8 | |
| |
-----------------------
9 | |
| |
-----------------------
10 | |
| |
-----------------------
-----------------------
0 | |
| |
-----------------------
1 | |
| |
-----------------------
2 | |
| |
-----------------------
3 | |
| |
-----------------------
4 | |
| |
-----------------------
5 | |
| |
-----------------------
6 | |
| |
-----------------------
7 | |
| |
-----------------------
8 | |
| |
-----------------------
9 | |
| |
-----------------------
10 | |
| |
-----------------------
20
/ \
10 30
\ / \
15 25 35
---100--
/ \
-50- 200
/ \ \
25 75 300
/ \
62 85
/
80
void sort_integers(IS input_file);If your input file is:
23 18 17 16 22 58then your output would look like:
58 3 23 1 22 3 18 1 17 1 16 2