{"id":20665171,"url":"https://github.com/martan03/sortingalgs","last_synced_at":"2026-07-03T08:32:54.315Z","repository":{"id":160439301,"uuid":"572247745","full_name":"Martan03/SortingAlgs","owner":"Martan03","description":"C Sorting Algorithms","archived":false,"fork":false,"pushed_at":"2024-01-10T21:10:53.000Z","size":777,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T09:40:40.257Z","etag":null,"topics":["c","c-lang","sort","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Martan03.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-29T21:32:45.000Z","updated_at":"2023-03-14T22:07:08.000Z","dependencies_parsed_at":"2024-01-10T22:27:56.233Z","dependency_job_id":"8d27d4de-6043-4b47-a9e0-630192314120","html_url":"https://github.com/Martan03/SortingAlgs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Martan03/SortingAlgs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2FSortingAlgs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2FSortingAlgs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2FSortingAlgs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2FSortingAlgs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Martan03","download_url":"https://codeload.github.com/Martan03/SortingAlgs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2FSortingAlgs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35079371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","c-lang","sort","sorting-algorithms"],"created_at":"2024-11-16T19:28:53.974Z","updated_at":"2026-07-03T08:32:54.285Z","avatar_url":"https://github.com/Martan03.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C Sorting Algorithms\n\n## Bubble sort\nBubble sort like algorithms:\n```C\nvoid bubble_sort(double* nums, int len);\nvoid bubble_sort_optimised(double* nums, int len);\nvoid bubble_sort_improved(double* nums, int len);\nvoid bubble_sort_recursive(double* nums, int len);\nvoid coctail_sort(double* nums, int len);\n```\n\n## Selection sort\n```C\nvoid select_sort(double* nums, int len);\n```\n\n## Insertion sort\n```C\nvoid insert_sort(double* nums, int len);\n```\n\n## Quick sort\n```C\nvoid quick_sort(double* nums, int len);\n```\n\n## Merge sort\n```C\nvoid merge_sort(double* nums, int len);\n```\n\n# Testing\nI wanted to find out, how much time it takes each algorithm to sort an array,\nso I tested it. Each algorithm sorts ascending array, descending array and\narray with random numbers.\n\nBubble sort algorithms take a while, so I tested them with only 100.000 numbers.\nThere are the results:  \n![image](https://user-images.githubusercontent.com/46300167/229298216-5839b0bb-8d39-455c-a854-8597b94aa09d.png)\n\n\nThen I tested all other algorithms, this time with 1.000.000 numbers:  \n![image](https://user-images.githubusercontent.com/46300167/229298302-0e3cb04e-f37f-4c0e-9eb9-8ebdfdafd15e.png)\n\n## Links\n\n- **Author:** [Martan03](https://github.com/Martan03)\n- **GitHub repository:** [SortingAlgs](https://github.com/Martan03/SortingAlgs)\n- **Author website:** [martan03.github.io](https://martan03.github.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartan03%2Fsortingalgs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartan03%2Fsortingalgs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartan03%2Fsortingalgs/lists"}