in Algorithms edited by
1,634 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.
in Algorithms edited by
1.6k views

1 Answer

0 votes
0 votes
Best answer

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