601 views
0 0 votes

Which of the following is true with respect to the rank of the element ?

(a) Worst case occur when pivot partitions the array in 0, n-1

(b) When pivot partitions the array in size n/2, n/2, the time complexity is O(n)

(c) When pivot partitions the array in 3n/7, 4n/7, the time complexity is O(n)

(d) Rank of 6 in array [1,2,6,4,9,10,-1,0] is 7 

 

Options are:

  1. a,b,c
  2. all of the above
  3. a,c
  4. only a

Please log in or register to answer this question.

Position:
Show:

Related questions

2 2 votes
1 answers 1 answer
1.3k
1.3k views
rsansiya111 asked Dec 8, 2021
1,349 views
Suppose we do merge sort with a three-way split: divide the array into 3 equal parts, sort each part and do a 3 way merge.What would the worst-case complexity of this ver...
0 0 votes
1 1 answer
2.2k
2.2k views
rsansiya111 asked Dec 8, 2021
2,162 views
Suppose we want to extend the union-find data structure to support the operation Reset(c), which takes as input the name of a component c and then breaks up c into single...
0 0 votes
1 answers 1 answer
1.1k
1.1k views
rsansiya111 asked Dec 8, 2021
1,097 views
Consider the following algorithm on a graph with edge weights.Sort the edges as [e1,e2,...,em] in decreasing order of cost.Start with the original graph. Consider each ed...
0 0 votes
1 1 answer
1.6k
1.6k views
rsansiya111 asked Dec 8, 2021
1,645 views
Consider the following strategy to convert a graph with negative edge weights to one that does not have negative edge weights. Let the maximum magnitude negative edge wei...