0 0 votes Minimum no of comparison to find minimum element out of n elements. Algorithms algorithms sorting recurrence-relation + – saurabh rai 1.3k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply Digvijaysingh Gautam commented Nov 14, 2016 reply Follow flag if we use heap then it is O(1) otherwise we will have to apply linear search on array which takes O(n) 0 0 replyShare saurabh rai commented Nov 14, 2016 reply Follow flag i m talking about exact number not asymptotic. 0 0 replyShare Please log in or register to add a comment.
1 1 vote Minimum no of comparison to find minimum element out of n elements is N-1 Shubham Pandey 2 answered Nov 14, 2016 Shubham Pandey 2 comment Share Follow See all 3 Comments 3 3 Comments reply saurabh rai commented Nov 14, 2016 reply Follow flag @shubham we have an algorithm for finding both min-max for n elements rec relation is T(n)=2T(n/2) +2 nd we need 3ceil(n/2)-2 comparison in worst case. so if we ll use above algorithm to find only minimum element we can use modified min-max DAC algorithm for this .that have recurrence relation of T(n)=2T(n/2)+1 ??m i right ?? 0 0 replyShare Shubham Pandey 2 commented Nov 14, 2016 reply Follow flag i understand your dout pls watch this https://www.youtube.com/watch?v=lEvzwEcjQ54&list=WL&index=63 0 0 replyShare saurabh rai commented Nov 14, 2016 reply Follow flag ok i got it actually rec relation T(n)=2T(n/2)+1 also gives n-1 comparison .it does not help 2 reduce no of comparison . 0 0 replyShare Please log in or register to add a comment.