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
34kurt
3 years ago
10

Which of the following is true? Group of answer choices worst case time of Heapsort is better than worst cast time of Quicksort

average case time of Quicksort is better than average case time of Heapsort best case time of Quicksort is worse that best case time of Heapsort both a) and b)
Computers and Technology
1 answer:
Sav [38]3 years ago
8 0

Answer:

Worst case time of Heapsort is better than worst case time of Quicksort.

Explanation:

Worstcase of Heapsort is nlog(n). Worstcase time of Quicksort is (n^2). Heapsort is comparison based sorting algorithm. Heapsort divides input into sorting. It is a selection sort in which we send maximum inputs for maximum elements at end. Quicksort is divide and conquer algorithm. It is considered as efficient sourcing algorithm.

You might be interested in
Consider a pipelined processor with just one level of cache. assume that in the absence of memory delays, the baseline cpi of th
babunello [35]

Alternative 1:A small D-cache with a hit rate of 94% and a hit access time of 1 cycle (assume that no additional cycles on top of the baseline CPI are added to the execution on a cache hit in this case).Alternative 2: A larger D-cache with a hit rate of 98% and the hit access time of 2 cycles (assume that every memory instruction that hits into the cache adds one additional cycle on top of the baseline CPI). a)[10%] Estimate the CPI metric for both of these designs and determine which of these two designsprovides better performance. Explain your answers!CPI = # Cycles / # InsnLet X = # InsnCPI = # Cycles / XAlternative 1:# Cycles = 0.50*X*2 + 0.50*X(0.94*2 + 0.06*150)CPI= 0.50*X*2 + 0.50*X(0.94*2 + 0.06*150) / X1= X(0.50*2 + 0.50(0.94*2 + 0.06*150) ) / X= 0.50*2 + 0.50(0.94*2 + 0.06*150)= 6.44Alternative 2:# Cycles = 0.50*X*2 + 0.50*X(0.98*(2+1) + 0.02*150)CPI= 0.50*X*2 + 0.50*X(0.98*(2+1) + 0.02*150) / X2= X(0.50*2 + 0.50(0.98*(2+1) + 0.02*150)) / X= 0.50*2 + 0.50(0.98*(2+1) + 0.02*150)= 3.97Alternative 2 has a lower CPI, therefore Alternative 2 provides better performance.

8 0
2 years ago
What are the benefits of writing functions that use parameters and return List 2 please and explain what is return
Ratling [72]

<u>Answer and explanation:</u>

There are many benefits of writing functions that use parameters and return. Some of them are:

1. Flexibility: With functions having parameters, several values of the parameters can be used at invocation time thereby making the application flexible. For example, given the following function in Java.

<em>public void showName(String name){</em>

<em>    System.out.println("Your name is " + name);</em>

<em>}</em>

To call this method (function), the programmer could use various values for the name parameter used in the function like so:

showName("John");

showName("Doe");

If the function didn't have a parameter, it is possible it will only print a hardcoded name every time the function is called.

2. Scope Control: When a function is allowed to return a value, it helps to work around scope issues since variables declared within a function are limited to that function and do not exist outside the function. This means that the values of these variables cannot be used anywhere else outside the function in which they are being declared. However, if the function returns a value, the value can be used anywhere else in the program.

For example:

<em>public String getDouble(int x){</em>

<em>    int y = x * 2</em>

<em>    return y;</em>

<em>}</em>

The function above returns twice the value of the argument supplied to it. Since the integer variable y is declared within the function, it's value cannot be used outside the function. However, since the value is being returned by the function, it could be used anywhere the function is being called. Thanks to the return keyword.

3 0
3 years ago
What provision of the Government Paperwork Elimination Act was designed to encourage a paperless society?
Ratling [72]
<span>Validation of electronic signatures was designed to encourage a paperless society.</span>
8 0
3 years ago
Read 2 more answers
Resolution has the most impact on the size of photo print you can make.
siniylev [52]
If you want the best possible print, you need to upload the best quality digital file. Sometimes photos might look just fine when you look at them on your computer screen, and you might wonder what’s up with us when we say we can’t print them. Photos that don’t have sufficient resolution will look all blurry and pixilated (blocky with jagged edges) when printed.
3 0
3 years ago
An employee mentions that opening a large document file is taking longer than usual. The desktop support technician suspects tha
kumpel [21]

Answer:

Perform data backup on the work computer

Explanation:

It is very important that at every point in time that a technician will perform a maintenance, repair, or troubleshooting. the data on the work computer should be backed up to avoid loss. This is done to avoid data loss resulting from failure from hardware or software, backup provides copy of critical data immediately the maintenance is done, therefore backup is very important before any troubleshooting is done.

8 0
3 years ago
Other questions:
  • Which strategy are you using when you only read the title, section headings, and captions?
    12·2 answers
  • Who invented the ENIAC? More than one answer may apply.
    14·1 answer
  • Carol typed a memo to send to everyone in her department. To create this memo, she used a _____.
    8·2 answers
  • Voice authentication requires speech to text capability Facial recognition may be used for authentication The human iris is uniq
    6·1 answer
  • When you are working in Performance Monitor, in the "Add Counters" dialog box, and need more information about a particular coun
    8·1 answer
  • You implement basic version control and go through the phase of creating a local repository. Initiate the commands to set up tha
    7·1 answer
  • Please could you help me
    6·2 answers
  • What steps can you take to secure your private information?.
    8·1 answer
  • Why is a Quality assurance tester needed on a software development team?
    5·1 answer
  • HELP ASAP
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!