{"id":23034733,"url":"https://github.com/ibnaleem/sort","last_synced_at":"2025-09-01T03:37:37.140Z","repository":{"id":233426537,"uuid":"787189128","full_name":"ibnaleem/sort","owner":"ibnaleem","description":"an array sorting algorithm in ascending order implemented in Python","archived":false,"fork":false,"pushed_at":"2024-04-16T04:08:14.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T22:23:54.250Z","etag":null,"topics":["array","array-manipulations","array-sorting","arrays","python","sort-algorithms","sorting","sorting-algorithm","sorting-algorithms","sorting-algorithms-implemented"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ibnaleem.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":"2024-04-16T03:57:11.000Z","updated_at":"2025-02-27T14:14:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f15fed0-b020-4d62-8e14-4ba844c5e923","html_url":"https://github.com/ibnaleem/sort","commit_stats":null,"previous_names":["ibnaleem/sort"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ibnaleem/sort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnaleem%2Fsort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnaleem%2Fsort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnaleem%2Fsort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnaleem%2Fsort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibnaleem","download_url":"https://codeload.github.com/ibnaleem/sort/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnaleem%2Fsort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273069997,"owners_count":25040176,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"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":["array","array-manipulations","array-sorting","arrays","python","sort-algorithms","sorting","sorting-algorithm","sorting-algorithms","sorting-algorithms-implemented"],"created_at":"2024-12-15T16:35:27.481Z","updated_at":"2025-09-01T03:37:37.115Z","avatar_url":"https://github.com/ibnaleem.png","language":"Python","readme":"# sort\nan array sorting algorithm in ascending order implemented in Python\n```py\ndef my_sort(arr: list) -\u003e list:\n  if len(arr) \u003c= 1:\n    return arr\n```\nEmpty and single element arrays cannot be sorted. The array requires at least two elements.\n```py\npivot = arr[0]\n```\nVariable `pivot` stores the value of the first element. This algorithm must *pivot* the given array to the left (less than) or right (greater than) of the first element. For example, if `pivot = 5`, then all elements less than 5 must be pivoted to the left, else, they must be pivoted to the right.\n```py\nleft = [i for i in arr[1:] if i \u003c= pivot]\nright = [i for i in arr[1:] if pivot \u003c i]\n```\nAll elements less than the first element are *pivoted* to the left, else, they are *pivoted* to the right.\n```py\nreturn my_sort(left) + [pivot] + my_sort(right)\n```\nRecursively sort the `left` and `right` arrays until they cannot be sorted, keep the `pivot` sandwiched between them (since all values to the `right` are greater than `pivot`, and all values to the `left` are less than or equal to `pivot`)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibnaleem%2Fsort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibnaleem%2Fsort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibnaleem%2Fsort/lists"}