Are we aiming for a solution that makes less than 2(n-1) comparisons in the average case? Or less than that even in the worst case?
Also, should the solution be a general one that doesn’t depend on the contents of the collection being integer? Or can it be specific to integers?
Thanks!
So far I’ve only looked at the solution 3 times. And that was only after I was 100% sure that I didn’t have any idea about how to solve those problems.