
Implement a function that sorts an array of record by key, ascending, without ever reordering two records that carry the same key.
record arr[] = {{30, 'a'}, {10, 'b'}, {20, 'c'}}; sort_records(arr, 3);b c arecord arr[] = {{5, 'a'}, {5, 'b'}, {5, 'c'}, {5, 'd'}}; sort_records(arr, 4);a b c drecord arr[] = {{1, 'a'}, {9, 'b'}, {1, 'c'}, {9, 'd'}, {1, 'e'}}; sort_records(arr, 5);a c e b drecord arr[] = {{9, 'z'}, {1, 'y'}}; sort_records(arr, 0);z ysort_records.c<stddef.h>defines size_t
Run the tests to grade your code
Implement a function that sorts an array of record by key, ascending, without ever reordering two records that carry the same key.
record arr[] = {{30, 'a'}, {10, 'b'}, {20, 'c'}}; sort_records(arr, 3);b c arecord arr[] = {{5, 'a'}, {5, 'b'}, {5, 'c'}, {5, 'd'}}; sort_records(arr, 4);a b c drecord arr[] = {{1, 'a'}, {9, 'b'}, {1, 'c'}, {9, 'd'}, {1, 'e'}}; sort_records(arr, 5);a c e b drecord arr[] = {{9, 'z'}, {1, 'y'}}; sort_records(arr, 0);z ysort_records.c<stddef.h>defines size_t
Run the tests to grade your code
Memory will appear here