{"id":18358055,"url":"https://github.com/archer-01/push_swap","last_synced_at":"2026-06-30T20:31:22.864Z","repository":{"id":49387848,"uuid":"461415307","full_name":"Archer-01/push_swap","owner":"Archer-01","description":"Sorting algorithm based on two stacks","archived":false,"fork":false,"pushed_at":"2023-12-06T16:00:48.000Z","size":278,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T21:45:00.711Z","etag":null,"topics":["c","problem-solving-algorithms","stacks"],"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/Archer-01.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-02-20T07:27:05.000Z","updated_at":"2023-08-05T14:17:41.000Z","dependencies_parsed_at":"2025-02-15T18:29:36.149Z","dependency_job_id":"b09e84ec-bd57-4af1-b477-cfeed5fdf514","html_url":"https://github.com/Archer-01/push_swap","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Archer-01/push_swap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2Fpush_swap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2Fpush_swap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2Fpush_swap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2Fpush_swap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Archer-01","download_url":"https://codeload.github.com/Archer-01/push_swap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2Fpush_swap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34983170,"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-06-30T02:00:05.919Z","response_time":92,"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","problem-solving-algorithms","stacks"],"created_at":"2024-11-05T22:16:36.475Z","updated_at":"2026-06-30T20:31:22.841Z","avatar_url":"https://github.com/Archer-01.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# push_swap\n\nA sorting algorithm based on two stacks\n\n## Main program\n\n### Description\n* **push_swap** is a program that takes a list of integers as input and sorts it in ascending order.\n* The program prints the instructions used to sort the list of integers.\n* The provided list of integers should have no duplicate numbers and should not surpass 4 bytes integer range.\n* The program uses two stacks to sort the list of integers: Stack A and Stack B.\n* The set of instructions **push_swap** might use is the following: **sa**, **sb**, **ss**, **ra**, **rb**, **rr**, **rra**, **rrb**, **rrr**, **pa** and **pb**\n\n#### Swap instructions\n![sa-sb-ss](doc/sa-sb-ss.png)\n\n#### Rotate instructions\n![ra-rb-rr](doc/ra-rb-rr.png)\n\n#### Reverse rotate instructions\n![rra-rrb-rrr](doc/rra-rrb-rrr.png)\n\n#### Push instructions\n![pa-pb](doc/pa-pb.png)\n\n### Usage\n```sh\ngit clone https://github.com/Archer-01/push_swap.git\ncd push_swap\nmake\n```\n```sh\n./push_swap [list_of_integers]\n```\n\n### Demo\n\n![push_swap Demo](doc/demo.png)\n\n## Bonus program\n\n### Description\n\n**push_swap** is associated with another program named\n**checker**\n\n* The **checker** program takes a list of integers as input and checks if the list is sorted in ascending order.\n* The program reads from standard input for instructions, if numbers get sorted the program prints **OK** followed by a newline, otherwise it prints **KO** followed by a newline.\n\n### Usage\n\n```sh\ngit clone https://github.com/Archer-01/push_swap.git\ncd push_swap\ngit checkout bonus\nmake bonus\n```\n```\n./checker [list_of_integers]\n```\n\n### Demo\n\n![checker Demo](doc/bonus-demo.png)\n\n[![r\nforthebadge](https://forthebadge.com/images/badges/made-with-c.svg)](https://forthebadge.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcher-01%2Fpush_swap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcher-01%2Fpush_swap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcher-01%2Fpush_swap/lists"}