-
-
Notifications
You must be signed in to change notification settings - Fork 542
Open
Labels
code quality ♻️Code quality enhancementCode quality enhancementenhancementExtension or improvement to existing featureExtension or improvement to existing featuregood first issue 🥇Good for newcomersGood for newcomers
Milestone
Description
Currently there's Vector_quickSort, Vector_quickSortCustomCompare, and Vector_insertionSort for sorting vectors.
Apply the Highlander rule and let there only be one: Vector_sort.
While at it, update the signatures to allow for context support in the comparison functions:
typedef int (*Object_SortFn)(const void *a, const void *b, void *ctx);
int Vector_sort(Vector *v, Object_SortFn cmp, void *ctx);
Note: The single replacement API MUST be a stable sorting algorithm internally to conserve behaviour of Vector_insertionSort.
natoscott
Metadata
Metadata
Assignees
Labels
code quality ♻️Code quality enhancementCode quality enhancementenhancementExtension or improvement to existing featureExtension or improvement to existing featuregood first issue 🥇Good for newcomersGood for newcomers