Question

For a list of length n, insertion sort makes _key comparisons, in the worst case. None of these O(nlogzn) On O) O() Question
0 0
Add a comment Improve this question Transcribed image text
Answer #1

                       ANSWER : HERE IS THE ANSWER FOR YOUR QUESTION:

  

                       ------------------------------------------------------------------------------------------------------

Question 1) insertion sort is the algorithm in which the comparision is done between the element of the list and the the element are keep on inserted at thier correct order in sorted form

in worst case , that is when the list is reversely sorted , the algorithm would make o(N ^2) comparisions

thus , the correct option is  

4) O(n^2)

Question 2) worst case of the quick-sort algorithm is when we select the left-most element of the list as pivot and also any of the below condition is true:

1) list is already sorted

2) list is reversely sorted

thus , the worst case complexity is o(n^2) and average case is o(n log n)

thus , the correct option is

c) o(n^2) and o(n log(n))

-------------------------------------------------------------------------------------------------------

I hope this would help you out.

If you like my answer , please upvote

If you have any doubt, you can provide comment /feedback below the answer

Thanks

Add a comment
Know the answer?
Add Answer to:
For a list of length n, insertion sort makes _key comparisons, in the worst case. None...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT