Objective
Implement a function that sorts an array of record by key, ascending, without ever reordering two records that carry the same key.
Steps
$ record arr[] = {{30, 'a'}, {10, 'b'}, {20, 'c'}}; sort_records(arr, 3);
b c a
$ record arr[] = {{5, 'a'}, {5, 'b'}, {5, 'c'}, {5, 'd'}}; sort_records(arr, 4);
a b c d
$ record arr[] = {{1, 'a'}, {9, 'b'}, {1, 'c'}, {9, 'd'}, {1, 'e'}}; sort_records(arr, 5);
a c e b d
$ record arr[] = {{9, 'z'}, {1, 'y'}}; sort_records(arr, 0);
z y
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers

Objective
Implement a function that sorts an array of record by key, ascending, without ever reordering two records that carry the same key.
Steps
$ record arr[] = {{30, 'a'}, {10, 'b'}, {20, 'c'}}; sort_records(arr, 3);
b c a
$ record arr[] = {{5, 'a'}, {5, 'b'}, {5, 'c'}, {5, 'd'}}; sort_records(arr, 4);
a b c d
$ record arr[] = {{1, 'a'}, {9, 'b'}, {1, 'c'}, {9, 'd'}, {1, 'e'}}; sort_records(arr, 5);
a c e b d
$ record arr[] = {{9, 'z'}, {1, 'y'}}; sort_records(arr, 0);
z y
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers

Tests
Run the tests to grade your code