GithubHelp home page GithubHelp logo

mharikmert / text-representation-with-bst Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 13 KB

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

C 100.00%
c binary-search-tree algorithm time-complexity time-complexity-analysis

text-representation-with-bst's Introduction

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

text-representation-with-bst's People

Contributors

mharikmert avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.