Nim icon indicating copy to clipboard operation
Nim copied to clipboard

Sorting Algorithms

Open dlesnoff opened this issue 2 years ago • 1 comments

Add multiple sorting algorithms: insertion sort, selection sort, bubble sort, merge sort with a file for some common tests.

I hesitate to add additional tests to illustrate the stability property of some sorts or to add the possibility to change the comparison function. I want to keep thing simple to be as much pedagogical as possible.

dlesnoff avatar Jun 02 '23 16:06 dlesnoff

Took a glance over. Looks great, I like the code/comment ratio (I'd spray TODO marks around those add description lines).

I think the testing scaffolding should live somewhere separately. Do you think it would be beneficial to start collecting the testing utils we can recommend to new contributors?

Also, in general, I don't like unseeded random in tests. No harm here, but they should be reproducible.

Re if verbose that you don't actually use, perhaps the checks can be swapped to when defined(debug)?

ZoomRmc avatar Nov 11 '24 23:11 ZoomRmc