{"id":16319426,"url":"https://github.com/hima890/sorting_algorithms","last_synced_at":"2025-05-14T00:15:17.048Z","repository":{"id":237613341,"uuid":"794887769","full_name":"hima890/sorting_algorithms","owner":"hima890","description":"Explore various sorting algorithms implemented in C within this repository. Each algorithm, such as Bubble Sort, Insertion Sort, Selection Sort, and Quick Sort, is meticulously crafted in separate C files. Witness these algorithms in action as they sort arrays or linked lists, with printed outputs after each step.","archived":false,"fork":false,"pushed_at":"2024-05-02T14:27:34.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T15:41:52.481Z","etag":null,"topics":["algorithms","alx","alx-africa","alx-low-level-programming","data-structures","search-algorithm"],"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/hima890.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-05-02T06:49:18.000Z","updated_at":"2024-06-06T11:15:50.000Z","dependencies_parsed_at":"2024-05-02T20:28:00.057Z","dependency_job_id":"519b53fb-499c-4d31-bf7f-29f58a282937","html_url":"https://github.com/hima890/sorting_algorithms","commit_stats":null,"previous_names":["hima890/sorting_algorithms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hima890%2Fsorting_algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hima890%2Fsorting_algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hima890%2Fsorting_algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hima890%2Fsorting_algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hima890","download_url":"https://codeload.github.com/hima890/sorting_algorithms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239207389,"owners_count":19599963,"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":["algorithms","alx","alx-africa","alx-low-level-programming","data-structures","search-algorithm"],"created_at":"2024-10-10T22:26:55.239Z","updated_at":"2025-02-16T22:44:57.032Z","avatar_url":"https://github.com/hima890.png","language":"C","readme":"\n![logo](images.png)\n\n# Sorting Algorithms\n\nThis repository contains implementations of various sorting algorithms in C. Each sorting algorithm is implemented in a separate C file and is tested with example arrays or linked lists.\n\n## Table of Contents\n\n- [Bubble Sort](#bubble-sort)\n- [Insertion Sort](#insertion-sort)\n- [Selection Sort](#selection-sort)\n- [Quick Sort](#quick-sort)\n\n## General Requirements\n\n- Code is written in C language.\n- All code is compiled on Ubuntu 20.04 LTS using gcc.\n- The code follows the Betty style.\n- Global variables are not allowed.\n- Each C file contains no more than 5 functions.\n- The standard library is not used unless specified otherwise.\n- Header files are included with include guards.\n- A README.md file is included at the root of the project folder.\n- All header files contain prototypes of functions.\n- List and array sizes less than 2 are not sorted.\n- There is one project repository per group.\n\n## Sorting Algorithms\n\n### Bubble Sort\n\n- Prototype: `void bubble_sort(int *array, size_t size);`\n- Sorts an array of integers in ascending order using the Bubble sort algorithm.\n- Prints the array after each swap.\n\n### Insertion Sort\n\n- Prototype: `void insertion_sort_list(listint_t **list);`\n- Sorts a doubly linked list of integers in ascending order using the Insertion sort algorithm.\n- Prints the list after each swap.\n\n### Selection Sort\n\n- Prototype: `void selection_sort(int *array, size_t size);`\n- Sorts an array of integers in ascending order using the Selection sort algorithm.\n- Prints the array after each swap.\n\n### Quick Sort\n\n- Prototype: `void quick_sort(int *array, size_t size);`\n- Sorts an array of integers in ascending order using the Quick sort algorithm with the Lomuto partition scheme.\n- Prints the array after each swap.\n\n## Big O Notations\n\nFor each sorting algorithm, the time complexity in the best case, average case, and worst case is provided in separate files named `0-O`, `1-O`, `2-O`, and `3-O`, respectively.\n\n## Usage\n\nTo test each sorting algorithm, compile the corresponding C files along with the main file and execute the compiled program.\n\nFor example:\n\n```bash\ngcc -Wall -Wextra -Werror -pedantic -std=gnu89 0-bubble_sort.c 0-main.c print_array.c -o bubble_sort\n./bubble_sort\n\n### Authors\nIbrahim Hanafi\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhima890%2Fsorting_algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhima890%2Fsorting_algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhima890%2Fsorting_algorithms/lists"}