https://github.com/shivammg/selforganizinglisttechniques
https://github.com/shivammg/selforganizinglisttechniques
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shivammg/selforganizinglisttechniques
- Owner: shivamMg
- License: mit
- Created: 2015-02-08T18:54:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-09T05:11:04.000Z (over 10 years ago)
- Last Synced: 2025-01-28T03:51:13.363Z (8 months ago)
- Language: C
- Size: 148 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Self Organizing List Techniques
A [Self Organizing List][1] reorders its elements in a way, so that the elements accessed the most are moved towards the front. The algorithm is applied in sequential access of files.
---
Three main techniques are:
- Move to front
- Transpose
- Count
### Move To FrontThe element is placed at the beginning of list after it is accessed.
### Transpose
The element is swapped with the preceding element after it is accessed.
### Count
Elements are sorted according to their frequency of access. The most accessed element will be at the front.
---
The three C programs cover these techniques. They also calculate the number of probes for the input.
Only strings with alphabets from lowercase *a-z* and whitespace *' '* are considered as valid inputs. You may alter the code to accept other elements.### Instructions
> - Compile the `.c` file.
> - Run the corresponding binary.
[1]: http://en.wikipedia.org/wiki/Self-organizing_list