Post

Generalized Binary Search (PENDING)

How to adapt binary search to a setting when the elements aren't equally likely present in the set.

Generalized Binary Search (PENDING)

1. Problem Statement

The standard binary search involves, at each time step, in a sorted array, partitioning the array into 2 halves about the middle number and pruning one of them based on the fact whether our search number is greater or less than the middle number.

  1. First why split in the middle only?

  2. Imagine the array has duplicates is the middle still the best? A better way to formulate our problem is using probability - …

This post is licensed under CC BY 4.0 by the author.