It reads number, word, frequency structured input files in files folder.
Firstly words are compared and be sorted in alphabetical order in a binary search tree.
Then frequencies are compared and words exchanes in the binary search tree according to their frequencies.
After the binary tree is created, total access time of the BST is also calculated.
Idea behind creating two BTS is to see the change of the total access time between two different BTS
Number | Word | Frequency |
---|---|---|
1 | people | 6 |
2 | country | 10 |
3 | city | 15 |
4 | news | 2 |
5 | population | 1 |
6 | society | 28 |
7 | university | 35 |
8 | sports | 62 |
9 | basketball | 28 |
-> git clone https://github.com/mharikmert/Text-Representation-with-BTS
-> gcc -o main main.c -lm
-> ./main