{"id":20269486,"url":"https://github.com/iker-gonzalez/push-swap","last_synced_at":"2025-08-18T16:09:00.941Z","repository":{"id":109131275,"uuid":"499788521","full_name":"iker-gonzalez/push-swap","owner":"iker-gonzalez","description":"Sorting algorithm with a limited set of instructions , using the lowest possible number of actions","archived":false,"fork":false,"pushed_at":"2022-06-04T18:40:20.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T23:23:34.290Z","etag":null,"topics":["42cursus","algorithm","c","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/iker-gonzalez.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":"2022-06-04T10:05:00.000Z","updated_at":"2024-10-19T12:36:51.000Z","dependencies_parsed_at":"2023-03-16T07:46:09.859Z","dependency_job_id":null,"html_url":"https://github.com/iker-gonzalez/push-swap","commit_stats":null,"previous_names":["iker-gonzalez/push-swap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iker-gonzalez/push-swap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iker-gonzalez%2Fpush-swap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iker-gonzalez%2Fpush-swap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iker-gonzalez%2Fpush-swap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iker-gonzalez%2Fpush-swap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iker-gonzalez","download_url":"https://codeload.github.com/iker-gonzalez/push-swap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iker-gonzalez%2Fpush-swap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271019985,"owners_count":24685787,"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-08-18T02:00:08.743Z","response_time":89,"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":["42cursus","algorithm","c","sorting-algorithms"],"created_at":"2024-11-14T12:25:28.184Z","updated_at":"2025-08-18T16:09:00.899Z","avatar_url":"https://github.com/iker-gonzalez.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Push Swap\n## Sorting Algorithmic project\n\nThe main goal is to sort data on a stack, with a limited set of instructions, using\nthe lowest possible number of actions. To succeed you’ll have to manipulate various\ntypes of algorithms and choose the one (of many) most appropriate solution for an\noptimized data sorting.\n\n### Game rules\n\n* The game is composed of 2 stacks named A and B. \u003cbr\u003e\n* To start with: \u003cbr\u003e\n◦ A contains a random number of either positive or negative numbers without\nany duplicates. \u003cbr\u003e\n◦ B is empty \u003cbr\u003e\n* The goal is to sort in ascending order numbers into stack A. \u003cbr\u003e\n* To do this you have the following operations at your disposal: \u003cbr\u003e\n\n| Command       | Description                                                                           |\n| ------------- | --------------------------------------------------------------------------------------| \n| \u003cb\u003esa\u003c/b\u003e     | swap a - swap the first 2 elements at the top of stack a. Do nothing if there is only one or no elements). |\n| \u003cb\u003esb\u003c/b\u003e     | swap b - swap the first 2 elements at the top of stack b. Do nothing if there is only one or no elements). |\n| \u003cb\u003ess\u003c/b\u003e     | sa and sb at the same time. |\n| \u003cb\u003epa\u003c/b\u003e     | push a - take the first element at the top of b and put it at the top of a. Do nothing if b is empty. |\n| \u003cb\u003epb\u003c/b\u003e     | push b - take the first element at the top of a and put it at the top of b. Do nothing if a is empty. |\n| \u003cb\u003era\u003c/b\u003e     | rotate a - shift up all elements of stack a by 1. The first element becomes the last one. |\n| \u003cb\u003erb\u003c/b\u003e     | rotate b - shift up all elements of stack b by 1. The first element becomes the last one. |\n| \u003cb\u003err\u003c/b\u003e     | ra and rb at the same time. |\n| \u003cb\u003erra\u003c/b\u003e    | reverse rotate a - shift down all elements of stack a by 1. The flast element becomes the first one. |\n| \u003cb\u003errb\u003c/b\u003e    | reverse rotate b - shift down all elements of stack b by 1. The flast element becomes the first one. |\n| \u003cb\u003errr\u003c/b\u003e    | rra and rrb at the same time. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiker-gonzalez%2Fpush-swap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiker-gonzalez%2Fpush-swap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiker-gonzalez%2Fpush-swap/lists"}