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 D
Rate difficulty Rate difficulty:
Choose a difficulty.

The worst case number of comparison is n. to search any element from singly link list.
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:
The expected number of comparison is 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.

Recurrance relation for procedure A (n) is
T(n) = T √n + 1 if n > 2
T(n) = 1 if n ≤ 2
T(n) = 1
Now, T (n) = T √n + 1
Put n = 2k, T (2k)= T (2k/2) + 1
Use S(K) for T (2k) then
S(K) = S(k/2) + 1
Apply masters method.
Klog21 ≅ 1
So θ (log k)
Now we know that
n = 2k so, k= log2n
So, O(log logn).
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.

Note:- In devotion place change first point by
1. (n+k)m = O(nm), where k and m are constants.
1. (n+k)m ≅ O (nm) because k & m are constant
 then growth rate of both the function is same.
2. 2n+1 ⇒ 2.2n, Here 2 is constant
 So function is 2n. Statement is true.
3. 22n+1 ⇒ 2.22n ⇒ 2.4n
 So 4n > 2n then 22n+1 ≠ O(2n).
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 B
Rate difficulty Rate difficulty:
Choose a difficulty.

For large value of y
P = P * (x/i)
S = S + P
When i < y and i + +

Hence S = ex
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