alesbe / sorting-visualizer

Sorting visualizer made with SFML and C++ 📊
MIT License
17 stars 11 forks source link

Added cockatil sort #16

Closed BlueSkeleton closed 2 years ago

BlueSkeleton commented 2 years ago

Added cocktail sort

alesbe commented 2 years ago

Thanks for your contribution! I cloned your repo to test it first, but I can't select Cocktail Sort using the Up/Down arrows, I'm checking what's wrong because everything seems good.

You're getting the same issue?

alesbe commented 2 years ago

Okay, I was using your main branch, I didn't realize that you made the changes in cocktail-sort branch.

I can select the algorithm, but I think that something it's wrong, here is the issue: algo

As you can see, the algorithm remains static when started, in this case I'm starting and stopping it to test, and also did a quick sort to check if it was just this algorithm. Did you tried the visualizer before doing the PR?

Probably the issue is in algo::cocktailSort().

BlueSkeleton commented 2 years ago

Hi! I'm very sorry about that, I'm a first time contributor. What happened was that while I very much wanted to contribute to your project, after a full day of attempts I could not get it to compile on either of my windows or linux installations and just sort of took it in good faith it would work. Nevertheless, I will give it another stab tomorrow and you can rest assured my next pull request will have cocktail sorting in working order

Sorry for the inconvenience

Tony :)

On Thu, 2 Jun 2022, 09:11 alesbe, @.***> wrote:

Okay, I was using your main branch, I didn't realize that you made the changes in cocktail-sort branch.

I can select the algorithm, but I think that something it's wrong, here is the issue: [image: algo] https://camo.githubusercontent.com/54d82492e5cd4925d40d49c77b4010ba9391e91effe4f179ba4be067aba1fd92/68747470733a2f2f692e696d6775722e636f6d2f794836494757582e676966

As you can see, the algorithm remains static when started, in this case I'm starting and stopping it to test, and also did a quick sort to check if it was just this algorithm. Did you tried the visualizer before doing the PR?

Probably the issue is in algo::cocktailSort().

— Reply to this email directly, view it on GitHub https://github.com/alesbe/sorting-visualizer/pull/16#issuecomment-1144576904, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANRKECOE6UUJK3JYKOI3KETVNBUDBANCNFSM5XTCDOKQ . You are receiving this because you authored the thread.Message ID: @.***>

alesbe commented 2 years ago

Hey! Thanks for your interest :)

Don't worry about it, I need to improve the installation and compatibility too, Im new with CMake and C++ projects.

Also, you mentioned cocktail sort, I think that is already implemented on the code, but I'm not sure, this was a few months ago: https://github.com/alesbe/sorting-visualizer/blob/70d211900db911ed1e40c3a5cddf0e512029beb2/src/SortAlgorithms.h#L11

Now the installation in Linux is easier, because we implemented an install.sh with CMake and included all the libraries, but is not optimized for Windows I think... Maybe I'll do something about it this weekend.

If you want to implement a new algorithm or something else, feel free to open a new issue/PR, I made a dev branch to commit there before releasing a new version.

Happy hacktoberfest! 🙌