Avatto > UGC NET COMPUTER SCIENCE > PRACTICE QUESTIONS > Data Structures and Algorithms > Performance Analysis of Algorithms and Recurrences

Data Structures and Algorithms MCQ - Performance Analysis of Algorithms and Recurrences

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

Minimum no of swap for selection sort is O when array is already sorted and maximum swap is Q(n).
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

Time complexity of radix sort is = O(nd)
Where n = keys, d = maximum digit in keys.
= d = log (nk)
O(nd) = O(n * k logn)
= k × O (nlogn)
= O(nlogn)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

Let the number of element is “K”, they can be sorted in Θ(k log k) time.
We try the options in decreasing order of complexity since, we need a tight band i.e. Θ

So if K ∈ Θ(log n) time required for loop sort is.
Θ(k log k) i.e.
Θ(log n x log log n), But this is not in Θ(log n)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption A
Rate difficulty Rate difficulty:
Choose a difficulty.
Share this question
Share:

It input is in either ascending order or in descending order both are worst case of quick sort Algorithms.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

If Input is either in ascending order or in descending order both are worst case of quick sort algorithm
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Why Practice with Avatto?
High Quality MCQsExam-focused questions with accurate answers
Detailed ExplanationsStep-by-step explanations to enhance learning
Latest Exam PatternBased on updated syllabus and pattern
Performance AnalyticsTrack performance and improve weak areas
100% Free PracticePractice unlimited questions for free
Boost Your PreparationAttempt mock tests, previous year papers and topic-wise quizzes.Explore All Tests →