Computers and Technology, 22.05.2020 23:00 payshencec21
Normally in merge sort we take an array, split it into two arrays of half the length of the original, sort those recursively, then merge the results together. In this problem you're asked to modify the merge sort to make 3 equally sized recursive calls:.
create 3 arrays of 1/3 the original length,
make recursive calls on all 3, and
merge the 3 (now sorted) arrays together.
Note, the size of A will always be divisible by 3 evenly (i. e. A. length%3==0).
Hint: for an array C and an index i, ((i>=C. length)?C[i]:Integer. MAX_VALUE) will be the value at C[i] if i is inbounds and "infinity" otherwise.
Example:
Given {5,8,3,1,7,2,9,6,4}
the 3 recursive calls would be made on {5,8,3}, {1,7,2}, and {9,6,4}
3 subsequent recursive calls (3 sets of 3) would be made on ({5}, {3}, & {8}), ({1}, {7}, & {2}), and ({9}, {6}, &{4})
3 merges are done to create {3,5,8}, {1,2,7}, and {4,6,9}
these results are then merged back into the original array as {1,2,3,4,5,6,7,8,9}.
Example:
Given {4,7,2}
the 3 recursive calls could be {4},{7},{2}
the resulting merge is {2,4,7}
The signature of your method will be
public static void merge3 Sort(int[] A)
Answers: 3
Computers and Technology, 22.06.2019 19:00
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
Normally in merge sort we take an array, split it into two arrays of half the length of the original...
Mathematics, 29.06.2019 10:30
Mathematics, 29.06.2019 10:30
Biology, 29.06.2019 10:30
Mathematics, 29.06.2019 10:30
Physics, 29.06.2019 10:30
English, 29.06.2019 10:30
Mathematics, 29.06.2019 10:30