AlgorandSIMULATION v1.0
Sequential Engines(17)
Parallel Engines
Merge Sort
sequentialRAMA divide-and-conquer algorithm that recursively splits the array into halves, sorts them, and merges the sorted halves back together.
SIMULATION STEP PROGRESSStep 1 / 1
SPEED (50%)
SIZE (8)
💡 Tip: Enter integers between 1 and 99. Max size is 16.
Code Workspace
1procedure mergeSort(A: list, l, r)
2 if l < r then
3 mid := floor((l + r) / 2)
4 mergeSort(A, l, mid)
5 mergeSort(A, mid + 1, r)
6 merge(A, l, mid, r)
7 end if
8end procedure
Currently highlights executing branch
RUNTIME COST METRICS
Comparisons0
Memory Writes0
Memory Reads0
Elements Swapped0
Computational Model:RAM (Single Core)
Theoretical Bound:O(N log N)
Space Complexity:O(N)
Communication Cost:0 (Shared Bus)
THEORETICAL ANALYSIS & RESEARCH
Conceptual Focus: A divide-and-conquer algorithm that recursively splits the array into halves, sorts them, and merges the sorted halves back together.
Real-world Industrial Applications:
- External sorting (extremely large files)
- Custom library sorts requiring stability (e.g., Python, Java)