DSA SheetLesson · no judge

CODE DRILL 1 · RUN ONLY

Write it, run it, read the output

This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.

TASK

Implement top-down merge sort for the tagged array [6, 3a, 8, 2, 5, 3b, 7, 1]. Compare elements by numeric value, use half-open ranges and one reusable temporary array, and print the sorted array with each tag preserved.

C++
Loading editor…

OUTPUT

Sample
[1, 2, 3a, 3b, 5, 6, 7, 8]

What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.

Next part · Code drill 2