Question
Easy
Which of the following recurrence relation is related to worst case time complexity of quick sort ?
1
$T(n)=T(n/2)+C$
2
$T(n)=2.T(n/2)+Cn$
3
$T(n)=T(n-1)+Cn$
4
$T(n)=7.T(n/2)+Cn^2$
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Software Engineering & Problem Solving
Topic: Programming Concepts
Correct Answer
Option C
Explanation
The correct option is (3): The recurrence relation for the worst-case time complexity of Quick Sort is $T(n)=T(n-1)+Cn$. The worst-case is triggered when the pivot selection consistently leads to the most unbalanced split possible. This occurs when the pivot always happens to be the smallest or largest element in the sub-array, dividing the problem of size $n$ into a subproblem of size $n-1$ and a trivial subproblem of size 0.…Read More
Similar Questions from HTET Exam - Level 3 - Year 2022
Question 1
Easy
Source :
HTET 2022
If the following functional dependencies holds on a selection R : $A \rightarrow B$, $A \rightarrow C$, $BC \rightarrow D$, $C \rightarrow F$, $B \rightarrow…
Chapter :
Database Management System (DBMS) & SQL
Topic :
Database Concepts
Question 2
Easy
Source :
HTET 2022
EBCDIC code 1111 1001 represents the character _______
Chapter :
Computer System & Hardware Fundamentals
Topic :
Encoding Schemes and Number System
Question 3
Easy
Source :
HTET 2022
In MS-Office Word, _______ option is used to navigate through structural view of document and _______ option is used to navigate long document through small…
Chapter :
Office Automation Tools
Topic :
Word Processor (MS Word)
Question 4
Easy
Source :
HTET 2022
In context of C++, which of the following is a valid statement ?
Chapter :
Object-Oriented Programming (C++)
Topic :
Class & Object in C++