Daily Shaarli

All links of one day in a single page.

December 5, 2020

Google AI Blog: Extra, Extra - Read All About It: Nearly All Binary Searches and Mergesorts are Broken

Learnt about this while researching good'ol binary search

TL;DR

int mid = low + ((high - low) / 2);

or

int mid = (low + high) >>> 1;

original source (SO)