You have 32 numbers. What is the least number of comparison needed to find the 2nd smallest out of them?Feed me more![]()
Tricky questionYou have 32 numbers. What is the least number of comparison needed to find the 2nd smallest out of them?
work out..even im confused with this ans..Tricky question![]()
good night..Good Night All:goodnight:
I think if we go by this order i.e 1+2+4+8+16=31 so the answer might be 31 I may be wrong coz I have seen this in one of the bank examsYou have 32 numbers. What is the least number of comparison needed to find the 2nd smallest out of them?
Minimum number of comparisons required will be n + log(n) -2 = 32 + 5 -2 = 35I think if we go by this order i.e 1+2+4+8+16=31 so the answer might be 31 I may be wrong coz I have seen this in one of the bank exams
Yes that too can happenMinimum number of comparisons required will be n + log(n) -2 = 32 + 5 -2 = 35
so 31 and 35 are the right ansYes that too can happen