sorting-visualizer icon indicating copy to clipboard operation
sorting-visualizer copied to clipboard

[FEAT]: The visualizer needs more sorting algorithms

Open alesbe opened this issue 3 years ago • 6 comments

Describe your problem:

Right now there is only 3 sorting algorithms, would be so cool to add more!

Steps to reproduce:

None

Possible fix (optional):

Add new sorting algorithms (how to add new algorithms)

OS

  • [x] Windows
  • [x] Mac OS
  • [x] Linux

alesbe avatar Apr 20 '22 10:04 alesbe

Hello,

Hope this is not too out of place. This looks like something I can contribute to. I've been looking for a first open source project. I'm familiar with SFML and C++. I'd like to take a crack at adding quicksort. (If you'd like.) c:

ghost avatar May 13 '22 15:05 ghost

Sure! I never had contributors to any project so it's a new experience for me too, I did this small wiki page with some info, let me know if you have any issue with the code, Im going to add some more info to the wiki page :)

alesbe avatar May 13 '22 17:05 alesbe

Think I may add merge sort later here. Give using the new branches a go. c:

ghost avatar Jun 04 '22 17:06 ghost

Awesome! Also, the algorithm functions will change a little bit (see #15), you can wait for the changes to be implemented because it's a relatively big change, or just make sure to pull the changes before doing the PR to prevent merge conflicts! :)

Edit: The changes has been implemented! #24

alesbe avatar Jun 05 '22 00:06 alesbe

Any sorting algorithms that haven't been added yet that I could contribute to?

Blargian avatar Dec 18 '22 10:12 Blargian

@Blargian sure, thanks for your interest!

Here is a guide on how to add a new sorting algorithm.

These are the algorithms currently implemented:

  • Bubble sort
  • Selection sort
  • Insertion sort
  • Quick sort
  • Cocktail shaker sort
  • Bogo sort

Maybe the code needs a bit of refactoring in some areas, if you need more info just let me know!

alesbe avatar Dec 18 '22 11:12 alesbe