Comment on Programmer tries to explain binary search to the police

<- View Parent
lustyargonian@lemm.ee ⁨1⁩ ⁨year⁩ ago

Binary search only works on sorted data, i.e. you know which side of the mid point is pointing towards the incident. If the incident leaves no trail, you can’t know whether you can discard the left side or the right side, making it a complicated linear search at that moment.

source
Sort:hotnewtop