What happens with a binary search on an uneven array/table

Viewed 583

Let's say we have a table or an array of N-length. What happens if the length of the table is uneven ? With an even table the length would be determined by doing N/2. I would assume that for an uneven table this still holds true.

Does it do N/2 and then take the integer part of the result and use that as "the middle" or does it round up/down ? Or does it do something else entirely ?

0 Answers
Related