Skip to content

Efficient, documented and Medium article attached. 3784 moves to sort 500 numbers!

Notifications You must be signed in to change notification settings

ulyssegerkens/push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 on 500 numbers

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

42.mp4
100.mp4
500.mp4
1000rev.mp4