Invariant Binary Search

preview_player
Показать описание
In this video we discuss invariant binary search, which is a very clean and intuitive way to implement binary search. We cover the ideas behind binary search and show implementation examples.

Presented by Akif Patel.
Recorded on Jan 20, 2021

Рекомендации по теме
Комментарии
Автор

This is nice. But it does have a hidden premise. That premise is that array indices start at zero. As such it will fail in languages (such as Julia, Mathematica, Lua, etc.) whose indices start at one. Two such cases are an array with one or two elements.

shall