
Implement a function that merges two already sorted integer runs into out, ascending, taking the value from left whenever the two fronts are equal.
merge_runs({1, 3, 5}, 3, {2, 4, 6}, 3, out)Expected result
1 2 3 4 5 6For your own tracking. Tests grade your code.
merge_runs({10, 20, 30}, 3, {1, 2, 3}, 3, out)Expected result
1 2 3 10 20 30merge_runs({1, 4, 4, 7}, 4, {2, 4, 4, 9}, 4, out)Expected result
1 2 4 4 4 4 7 9int out[3] = {-1, -2, -3}; merge_runs(left, 0, right, 0, out);Expected result
-1 -2 -3Expected files
merge_runs.cAllowed functions
None. Write every helper yourself.
Allowed headers

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement a function that merges two already sorted integer runs into out, ascending, taking the value from left whenever the two fronts are equal.
merge_runs({1, 3, 5}, 3, {2, 4, 6}, 3, out)Expected result
1 2 3 4 5 6For your own tracking. Tests grade your code.
merge_runs({10, 20, 30}, 3, {1, 2, 3}, 3, out)Expected result
1 2 3 10 20 30merge_runs({1, 4, 4, 7}, 4, {2, 4, 4, 9}, 4, out)Expected result
1 2 4 4 4 4 7 9int out[3] = {-1, -2, -3}; merge_runs(left, 0, right, 0, out);Expected result
-1 -2 -3Expected files
merge_runs.cAllowed functions
None. Write every helper yourself.
Allowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.