Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question No.1 Considering the pseudo code of Heap Sort discussed in lectureanswe

ID: 3618807 • Letter: Q

Question

Question No.1

Considering the pseudo code of Heap Sort discussed in lectureanswer the following
questions (you need to justify your answers as well),
a. What will be the running time of Heap Sort if input is sorted inascending
order
b. What will be the running time of Heap Sort if input is sorted indescending
order
c. What is best case input (format of input resulting in best casetime) for Heap
Sort.

Question No.2

Considering the pseudo code of Quick Sort discussed in lectureanswer the following
questions (you need to justify your answers as well),
a. What will be the running time of Quick Sort if input is sortedin ascending
order
b. What will be the running time of Quick Sort if input is sortedin descending
order
c. What is best case input (format of input resulting in best casetime) for Quick
Sort.

Question No.3

Give the conditions, in which we can use the following linear timealgorithms,
a. Counting Sort
b. Radix Sort
c. Bin Sort

Explanation / Answer

Please Rate.. As per Cramster Policy. One question per post. Give the conditions, in which we can use the following lineartime algorithms,

a. Counting Sort Data is not much scattered. it must be spoill in small range.Means the difference between is the Mamimum number in the data andthe minimum number in the data is low.

b. Radix Sort
Radix sort removes the short comming of the counting sort, incounting sort if the data is varry in large range then it notremain liner. in radix sort we can sort data with respect to onedigit.
c. Bin Sort Number lies in small fixed range and their is only one itemagainst the key.
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote