Steps to reproduce
- Choose any sorting algorithm.
- Choose any array size.
- Run the sort.
- When the sort has finished the array starts to fill
rgb(1, 180, 1), press the "SORTING..." button, it completely breaks the app.
Result
If pressed in the correct timing, the app stops working and requires a reload or simply break until the "SORT" button hit again.
Possible solution
the array has yet to finish filling rgb(1, 180, 1) (isSorted to true), but you can already invoke next sorting algorithm run.