Skip to content

A simple word sorting algorithm with different Binary Search Trees and time complexities in C programming language

Notifications You must be signed in to change notification settings

mharikmert/text-representation-with-bst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Text Representation with Binary Search Trees

How it works?

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

Sample Inputs

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

Outputs

First Binary Search Tree

Screenshot from 2021-03-15 19-42-22

Second Binary Search Tree

Screenshot from 2021-03-15 19-42-34

Clone, Compile and Run

-> git clone https://github.com/mharikmert/Text-Representation-with-BTS
-> gcc -o main main.c -lm
-> ./main

About

A simple word sorting algorithm with different Binary Search Trees and time complexities in C programming language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages