Day 8 - Yay, new algorithm!
There we are after another week.. it’s gonna be quick since I didn’t change many things.
New sorting algorith, merge sort! yay!
After reworking the entire code to use vectors, I managed to add the merge sort algorithm!
I had to use some AI because after making the basic implementation, it just kept crashing the program.
The problem was that the function that merged everything had recursions in it, and since my way of visualizing this sorting algorithms is step-by-step, it would cause calling the function too many times until it crashed.
Anyway, after fixing with ChatGPT now it works well and it shouldn’t have any problem!
Next thing I’ll work on is:
- Quick sort, so at least I have 5 algorithms for shipping
- Add a way to show a quick description of the algorithm
- Add a way to compare the algorithms (I’m not sure I’ll add it though as I have no idea what to compare)
- Cleaning up some code
- Work more on the animations while sorting (they’re kinda ugly but I have no idea how to make them better)
Here’s a quick screenshot of the merge algorithm working!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.