Skip to content
This repository has been archived by the owner on May 24, 2019. It is now read-only.
/ qsort Public archive

The task of Advanced Programming class on 2018/10/10. Implementation of C library function qsort().

License

Notifications You must be signed in to change notification settings

Menci/qsort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qsort

An implanentation of C library function qsort() which is based on Quick Sort algorithm and falls back to Insertion Sort when the interval have few elements and falls back to Heap Sort when recursive too deep.

Usage

Just #include <qsort.h> and use the function _qsort() to reaplce the C-library version of qsort().

Performance

Usually runs faster than qsort() when n = 400000 on my machine (Ubuntu 18.04 LTS on a Surface Book with Performance Base(i7-6600U)).

Obviously runs slower than std::sort().

About

The task of Advanced Programming class on 2018/10/10. Implementation of C library function qsort().

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published