{"id":20904382,"url":"https://github.com/magnitopic/push_swap","last_synced_at":"2025-04-19T17:46:34.544Z","repository":{"id":73212852,"uuid":"579717429","full_name":"magnitopic/push_swap","owner":"magnitopic","description":"Sort stacks of numbers in the most efficient way possible","archived":false,"fork":false,"pushed_at":"2024-03-20T12:25:18.000Z","size":125,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T11:06:28.287Z","etag":null,"topics":["42cursus","clang","dynamic-programming","push-swap","push-swap42","sorting-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/magnitopic.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}},"created_at":"2022-12-18T17:00:00.000Z","updated_at":"2025-01-27T23:18:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b9bf4e7-769e-4cf1-b920-c6a1f4e9a359","html_url":"https://github.com/magnitopic/push_swap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnitopic%2Fpush_swap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnitopic%2Fpush_swap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnitopic%2Fpush_swap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnitopic%2Fpush_swap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magnitopic","download_url":"https://codeload.github.com/magnitopic/push_swap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249752141,"owners_count":21320448,"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":["42cursus","clang","dynamic-programming","push-swap","push-swap42","sorting-algorithms","stacks"],"created_at":"2024-11-18T13:16:56.694Z","updated_at":"2025-04-19T17:46:34.526Z","avatar_url":"https://github.com/magnitopic.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Push Swap\n\nThis project will make you sort data on a stack, with a limited set of instructions, using the lowest possible number of actions. To succeed you’ll have to manipulate various types of algorithms and choose the most appropriate solution (out of many) for an optimized data sorting.\n\nhttps://github.com/magnitopic/push_swap/assets/21156058/a18ae060-f8a7-4b4e-a356-a4eb3c4e3793\n\n\u003e Video of program execution on YouTube: [https://youtu.be/CugSe5HDVrg](https://youtu.be/CugSe5HDVrg)\n\n# Program\n\n## Initial installation\n\n```bash\ngit clone https://github.com/magnitopic/push_swap.git\ncd push_swap\ngit submodule init\ngit submodule update\n```\n\n## Compilation and execution\n\n```bash\nmake\n./push_swap 3 2 1\n```\n\n## Count amount of moves\n\n```bash\n./push_swap 3 2 1 | wc -l\n```\n\n## Counting execution time\n\n```bash\ntime ./push_swap 3 2 1\n```\n\n# Checker program\n\nThe **bonus** part of the project is to develop a checker program for the mandatory part. This program will receive the numbers and the instructions from the standard input and will check if the numbers are sorted.\n\n```bash\nmake bonus\n./push_swap 3 2 1 | ./checker 3 2 1\n```\n\n# Online visualizer\n\nYou can run Push_swap in [this online visualizer.](https://push-swap-visualizer.vercel.app)\n\nExecute the program with the numbers the page generates and place the output in a file.\nYou can later upload it and see the execution of the program.\n\n```bash\n./push_swap 3 2 5 4 1 \u003e result\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagnitopic%2Fpush_swap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagnitopic%2Fpush_swap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagnitopic%2Fpush_swap/lists"}