courtrigrad
- 1,236
- 2
Let's say you want to write an algorithm for MergeSort given the following:
I know the algorithm:
MergeSort
1. If array has 1 element don't don anything
2. Split array in two halves
3. Sort the first half and the second half
4. Merge both halves into one.
Any help is appreciated
Code:
public void(int[]a, int n1, int m, int n2)
MergeSort
1. If array has 1 element don't don anything
2. Split array in two halves
3. Sort the first half and the second half
4. Merge both halves into one.
Any help is appreciated
