divide the input array into thirds (rather than halves), recursively sort each third, and finally combine the results using a three-way Merge subroutine. What is the running time of this algorithm as a function of the length n of the input array, ignoring constant factors and lower-order terms

Respuesta :

Answer:

The answer is "nlogn".

Explanation:

  • The time complexity can only shift to 3 with the last instance.  For the 2nd case, they need one parallel. However, 2 parallels are needed to sort with splitting into 3-way frames.
  • It decreases the number of passes even after breaking the collection in 3 by increasing contrast. So, the time complexity remains the same but the log is divided into 3 bits.  
  • The complexity of time is:   [tex]T(n)=3T(\frac{n}{3})+ O(n) = O(nlogn)_3.[/tex]