Question
Modify the Javaalgorithm so that it splits the list into 3 sublists (instead of two). Each sublist should contain about n/3 items. The algorithm should
Modify the Javaalgorithm so that it splits the list into 3 sublists (instead of two). Each sublist should contain about n/3 items. The algorithm should sort each sublist recursively and merge the three sorted sublists. The traditional merge sort algorithm has an average and worst-case performance of O(n log2 n). What is the performance of the newly made algorithm?
import java.util.Arrays; public class MergeSort { public static void main(String[] args) { int[] values = new int[15]; for(int i=0; i
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started