edited by
1,640 views
2 votes
2 votes

Which of the following statement is true?

  1. Binary insertion sorting (insertion sort that uses binary search to find each insertion point) requires $O (n \log n)$ total operations.
  2. In the merge-sort execution tree, roughly the same amount of work is done at each level of the tree.
  3. In a min-heap, the next largest element of any element can be found in $O(\log n)$ time.
  4. In a BST, we can find the next smallest element to a given element in $O(1)$ time.
edited by

1 Answer

Best answer
0 votes
0 votes

Insertion Sort with Binary search : yes no comparison surely reduced bt no of swaps still be there.. Time complexity remain O(n2).
Time complexity of  Merge Sort T(n) = T(n/2) + O(n) here O(n) is level cost.
In min heap for next max it will take O(n) time .
Let element is X .. then Find X will take O(n) in worst  case then constant time to find next min. Total O(n)

only B is correct .

selected by

Related questions

1 votes
1 votes
2 answers
1
akankshadewangan24 asked Sep 20, 2018
884 views
If t(n) and s(n) denotes the time and space complexity of an algorithm with input size n element then which one of the following is always true?S(n)=O(t(n)) correct H...
0 votes
0 votes
3 answers
2
Subham Nagar asked Mar 20, 2018
1,254 views
An array $'A'$ has $n$ distinct integers. What is the tightest time complexity to check $A[i]=i$ for some $i$. Consider all elements of array within range from $1$ to $n$...
0 votes
0 votes
0 answers
3
Kai asked Jan 29, 2017
444 views
Time complexity of the given program is?
1 votes
1 votes
1 answer
4