0 votes 0 votes Algorithms hashing algorithms test-series + – shivanisrivarshini asked Jun 5, 2016 edited Jul 16, 2022 by makhdoom ghaya shivanisrivarshini 568 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments rude commented Jun 5, 2016 reply Follow Share @manojk sir, I think 4 comparison. 2 is empty then i do not think that we need any comparison there. what you say? 0 votes 0 votes ManojK commented Jun 5, 2016 reply Follow Share we have to find here the maximum no comparison to search an element that is not present so , So consider the part S6 S3 S7 S1 which will give maximum no of comparison i.e. 5 0 votes 0 votes ManojK commented Jun 5, 2016 reply Follow Share No rude sir we have to count 2 also otherwise how we know 2 is empty that is also one comparision 2 votes 2 votes Please log in or register to add a comment.
Best answer 5 votes 5 votes We need 5 comparison, maximum here. Suppose if we are searching some element which should be present at index 8, then you have to compare it to 8,9,0,1,2. Since 2 is empty then you do not need to go forward. hence Total maximum comparison will be 5. rude answered Jun 5, 2016 selected Jun 9, 2016 by rude rude comment Share Follow See all 0 reply Please log in or register to add a comment.