1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
katrin2010 [14]
3 years ago
15

divide the input array into thirds (rather than halves), recursively sort each third, and finally combine the results using a th

ree-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
Computers and Technology
1 answer:
Digiron [165]3 years ago
4 0

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:   T(n)=3T(\frac{n}{3})+ O(n) =  O(nlogn)_3.
You might be interested in
What is the advantage of defining a target user?
spayn [35]
3) helps the designer develop a website tailored to the desired audience
4 0
3 years ago
Write a function called mul_time that takes a Time_Elapsed object and a number and returns a new Time_Elapsed object that contai
lisov135 [29]

# Write a function called mul_time that takes a Time object and a number and

# returns a new Time object that contains the product of the original Time and

# the number.

# Then use mul_time to write a function that takes a Time object that

# represents the finishing time in a race, and a number that represents the

# distance, and returns a Time object that represents the average pace (time

# per mile).

# Current Status: Complete

class Time(object):

   """ represents the time of day.

   attributes: hour, minute, second"""

time = Time()

time.hour = 3

time.minute = 0

time.second = 0

def time_to_int(time):

   minutes = time.hour * 60 + time.minute

   seconds = minutes * 60 + time.second

   return seconds

def int_to_time(seconds):

   new_time = Time()

   minutes, new_time.second = divmod(seconds, 60)

   time.hour, time.minute = divmod(minutes, 60)

   return time

def mul_time(time, multicand):

   time_int = time_to_int(time) * multicand

   new_time = int_to_time(time_int)

   if new_time.hour > 12:

       new_time.hour = new_time.hour % 12

#    print ("New time is: %.2d:%.2d:%.2d"

#    % (new_time.hour, new_time.minute, new_time.second))

   return new_time

# mul_time(time, 2)

def race_stats(time, distance):

   print ("The finish time was %.2d:%.2d:%.2d"

         % (time.hour, time.minute, time.second))

   print "The distance was %d miles" % (distance)

   average = mul_time(time, (1.0 / distance))

   print ("The average is: %.2d:%.2d:%.2d per mile"

         % (average.hour, average.minute, average.second))

race_stats(time, 3)

7 0
2 years ago
How do you put a picture when you ask a question?
Setler [38]

Answer:

there should be an option to attach an item. if not try pasting it

Explanation:

5 0
3 years ago
Read 2 more answers
Which subunit of a heterodimeric cdk is the regulatory subunit?
Lemur [1.5K]
The answer is cyclin subunit
8 0
2 years ago
Which task is not possible with VLOOKUP?
Flauer [41]

Answer:c

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • An administrator working on a Windows Server 2016 Server Core installation needs to disable DHCP on all interfaces on the server
    12·1 answer
  • Difference between change management n asset management
    11·1 answer
  • I love dog my is 16 weeks old how old is yours
    12·1 answer
  • What is the meaning of the phrase the video has gone viral
    9·2 answers
  • We already know that we can create a lunar lander application of the pipe-and-filter architecture style from three independent J
    6·1 answer
  • Diverting an attacker from accessing critical systems, collecting information about the attacker's activity and encouraging the
    8·1 answer
  • Write a loop that sets newScores to oldScores shifted once left, with element 0 copied to the end. Ex: If oldScores = {10, 20, 3
    14·1 answer
  • Computer is a major source of informarion why​
    8·1 answer
  • This code --> plt.plot(x,y) is used to draw :
    8·1 answer
  • Budgeting for a Computer
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!