For most cases it will be faster than mergesort or qsort.
make
cat "somefilewithwords.txt" | ./a.out
https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt
time sort < <(head -n 1000000 somefilewithwords.txt) # head used here to trick GNU Sort to work in single threaded mode
time ./a.out < <(head -n 1000000 somefilewithwords.txt)
- Needs proper explaination, visalisation of how data structure and whole sorting works. Sometimes even i get confused.
Has huge memory footprint, probably leaks.. definitively needs further optimisations.- Multi-threading support. For now it's single-threaded.