451 views
1 votes
1 votes

An element in an array X is called leader if it is middle element in the sorted array. The best algorithm to find leader in an array.

  • Takes linear time using median of median of array
  • Takes (n logn) time using merge sort.
  • Takes Ο(n2) time using n time linear search
  • Takes Ο(logn) time using binary search tree.

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
damz1499 asked Nov 11, 2022
285 views
0 votes
0 votes
0 answers
2
vishnu777 asked Sep 28, 2021
1,757 views
Can anyone please keep the solution manual of Horowitz and sahani introduction to algorithms textbook
1 votes
1 votes
0 answers
4
srestha asked May 19, 2019
594 views
Let $A(n)$ denotes the number of $n$ bit binary strings which have no pair of consecutive $1’s.$ what will be recurrence relation for it and what will be it’s Time Co...