push_swap
push_swap copied to clipboard
Efficient, documented and Medium article attached. 3784 moves to sort 500 numbers!
An Effective Push Swap
This project helped you? Give it a 🌟!
📊 General information
Version: 6. Bonus included. Article about the algorithm of this project: Push Swap in less than 4200 operations.
🚀 Benchmark
Perform on 10000 random sample. Worst = 3871 instructions Average = 3784 instructions Best = 3680 instructions Standard deviation = 27.0 instructions
⚙️ Implementation details
Cf. /push_swap_docs.md: Stacks data structure; Error management; Inputs format; Checker: Why do not reuse get_next_line.
🛠️ Useful tools
🧬 Program Flowchart
/illustrations/push_swap_flowchart.svg
📋 Testing
Tested by 42 students (125%) and mention as an outstanding project 🎉.
✨ Illustrations
https://github.com/ulyssegerkens/push_swap/assets/99326326/77c80f0d-5759-4849-b321-d4f5506d3351
https://github.com/ulyssegerkens/push_swap/assets/99326326/71651fc8-4528-46b0-ae41-477ff0b505a7
https://github.com/ulyssegerkens/push_swap/assets/99326326/5a501e82-7e0f-488f-b115-a1579171d245
https://github.com/ulyssegerkens/push_swap/assets/99326326/a061b35d-aa0b-4143-9ce4-b3d8b496eb96