Algorithm : Nuclear Quiz 2
Attempt now to get your rank among 220 students!
Question 1
I. Insertion sort work better when the array is almost sorted.
II. Insertion Sort will asymptotically work better when we use binary search instead of linear search.
III. Insertion sort best case is O(n2).
IV. Between insertion sort and Selection sort, Selection sort is preferred when swap is costly instead of insertion sort.
Question 2
I. 999999n
II. 0.99999n logn
III. 1.000001n
IV. n2
The increasing order of the above functions in terms of their asymptotic complexity is
Question 3
S1: = n2019 = O(n2020)
S2: = O(n2019) = O(n2020)
Which of the above statements is/are correct?
Question 4
i) Ideal for sorted array
ii) Works best when input is not almost sorted.
iii) worst case is O(n2)
iv) Better than insertion sort for every type of input.
Question 5
Which of the following best describes T(n) ?
Question 6
f(n) = (log n)n-1
g(n) = 2n
h(n) = en/n
Which of the following is true?
Question 7
Question 8
Question 9
In the above algorithm, if input data items are already in sorted order then what is the Time complexity?
Question 10
What is the worst case running time of the function f for any positive value of n ?
- 220 attempts
- 2 upvotes
- 0 comments
Tags :
GATE & PSU CSAlgorithms