0 votes 0 votes An unordered list contains $n$ distinct elements. The number of comparisons to find an element in the list that is larger than the second minimum in the list is $\Theta(n \log n)$ $\Theta(n/ \log n)$ $\Theta(1)$ $\Theta(\log n)$ Algorithms uppcl2018 algorithms time-complexity + – admin asked Jan 5, 2019 • retagged Apr 19, 2022 by Lakshman Bhaiya admin 405 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes I think just 3 comparisons are needed among 1st, 3 elements of the array. the elements greater in this 1st, 3 elements will definitely be greater than the 2nd minimum element. Hence T(n) = O(1) saurav raghaw answered Mar 3, 2019 saurav raghaw comment Share Follow See all 2 Comments See all 2 2 Comments reply pawan kumarln commented Sep 20, 2019 reply Follow Share but how we will find 2nd minimum of list? 0 votes 0 votes amit166 commented Jun 1, 2022 reply Follow Share It’s telling that just largest of 2nd minimum means any number greater than 2nd minimum you chose any three number to compare them and find largest number in 2 comparsions because list order or unordered. ex unorder list = 4,5,6,2,1,3 let we pick randomly 3 no of list 4,5,6 comparisons finding largest of 2nd is 2 and number is 6 0 votes 0 votes Please log in or register to add a comment.