Could it be that youve got the adaptions if min and max exactly the wrong way round? If you get an exception the array has less than mid elements and max should then be mid.
RE: Efficiency is important. Here's a better way to find the length of an array.
You are viewing a single comment's thread from:
Efficiency is important. Here's a better way to find the length of an array.