{"id":17209167,"url":"https://github.com/rswinkle/sorting","last_synced_at":"2025-08-06T08:21:29.300Z","repository":{"id":5639422,"uuid":"6847832","full_name":"rswinkle/sorting","owner":"rswinkle","description":"A collection of sorting algorithms and a simple benchmark program","archived":false,"fork":false,"pushed_at":"2020-07-13T21:17:18.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T22:19:32.322Z","etag":null,"topics":["heapsort","mergesort","quicksort","sorting","sorting-algorithms"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rswinkle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"liberapay":"rswinkle","custom":"http://www.robertwinkler.com/donations.html"}},"created_at":"2012-11-25T05:23:44.000Z","updated_at":"2020-07-13T21:17:20.000Z","dependencies_parsed_at":"2022-09-08T12:11:14.504Z","dependency_job_id":null,"html_url":"https://github.com/rswinkle/sorting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rswinkle%2Fsorting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rswinkle%2Fsorting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rswinkle%2Fsorting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rswinkle%2Fsorting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rswinkle","download_url":"https://codeload.github.com/rswinkle/sorting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245458048,"owners_count":20618693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["heapsort","mergesort","quicksort","sorting","sorting-algorithms"],"created_at":"2024-10-15T02:50:57.358Z","updated_at":"2025-03-25T11:41:47.626Z","avatar_url":"https://github.com/rswinkle.png","language":"C","funding_links":["https://liberapay.com/rswinkle","http://www.robertwinkler.com/donations.html"],"categories":[],"sub_categories":[],"readme":"Sorting Algorithms\n==================\n\n[![Run on Repl.it](https://repl.it/badge/github/rswinkle/sorting)](https://repl.it/github/rswinkle/sorting)\n\nThis is just a set of sorting algorithms and a benchmarking program.\n\nI should add several more sorting algorithms and have a cleaner divided system for testing\nsets of algorithms with different Big-O running times.\n\nI realize that clock() isn't the most accurate/precise timing method\nbut it's simple to use and will result in the same ranking even if\nthose numbers aren't actually milliseconds.\n\n\"The clock() function returns the processor time since the program started, or - 1 if\nthat information is unavailable. To convert the return value to seconds, divide it\nby CLOCKS_PER_SEC. (Note: if your compiler is POSIX compliant, then CLOCKS_PER_SEC is\nalways defined as 1000000.) \"\n\nBuilding and Running\n====================\n\nYou can use the included makefile:\n\n    cd build\n    make\n    ./benchmark\n\nOr you can regenerate it or another build system using premake5\n\n    premake5 gmake\n    cd build\n    make\n    ./benchmark\n\nThere's benchmark is the main C program that I usually update and test with new algorithms\nand cppbenchmark which I only occasionally use, mostly just to make sure everything still compiles\nand runs the same as C++.\n\nThe results are pretty self explanatory but you can redirect them to a file (output.dat) and then\nrun plotbarchart.py to get a \"nice\" bar chart of the data.  See heapsort_times.png and quicksort_times.png\nfor old examples.\n\nAlgorithms\n==========\n- [x] Quicksort and 3 variations\n- [x] Heap sort and 2 variations\n- [x] Merge sort and 1 variation\n- [x] Insertion sort\n- [ ] Radix sort\n- [ ] Shell sort\n- [ ] Comb sort\n- [ ] Gnome Sort, Bubble Sort, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frswinkle%2Fsorting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frswinkle%2Fsorting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frswinkle%2Fsorting/lists"}