Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For java, I need help adding statements to this that trace the progress of the m

ID: 3712079 • Letter: F

Question

For java, I need help adding statements to this that trace the progress of the method sort by displaying the array table after each 'merge' operation. Also display the array referenced by leftTable and rightTable.

Algorithm for Merge Sort

1. if the tableSize is >1

2. Set halfSize to tabIeSize divided by 2.

3. Allocate a table called leftTable of size haIfSize.

4. Allocate a table called rightTable of size tableSize - halfSize.

5. Copy the elements from table[0 . . . halfSize - 1] into leftTabIe.

6. Copy the elements from table[ha1fS1'ze . . . tableSize] into rightTabl e.

7. Recursively apply the merge sort algorithm to leftTable.

8. Recursively apply the merge sort algorithm to rightTab'le.

9. Apply the merge method using leftTable and rightTable as the input and the original
table as the output.

Explanation / Answer

SourceCode: