Hacker News new | ask | show | jobs
by quietbritishjim 1050 days ago
> I see (left+right)/2.

There is no (left+right)/2 on that page.

   let mid = left + size / 2;
It's only size that is being divided by 2, which is the size of the segment still under consideration (which is initially the whole array). left is the starting index of segment still under consideration (which is initially 0).