Algorithm : Nuclear Quiz 2
Attempt now to get your rank among 159 students!
I. Insertion sort work better when 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 if O(n2).
IV. Between insertion sort and Selection sort, Selection sort is preferred when swap is costly instead of insertion sort.
II. 0.99999n logn
The increasing order of the above functions in terms of their asymptotic complexity is
S1: = n2019 = O(n2020)
S2: = O(n2019) = O(n2020)
Which of the above statements is/are correct?
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.
Which of the following best describes T(n) ?
f(n) = (log n)n-1
g(n) = 2n
h(n) = en/n
Which of the following is true?
In the above algorithm, if input data items are already in sorted order then what is the Time complexity?
What is the worst case running time of the function f for any positive value of n ?
- 159 attempts
- 2 upvotes
- 0 comments