Subparadoxical Algorithms Subparadoxical Theory Algorithmic Logic

Subparadoxical Algorithms

The Inverted Binary Search

A search algorithm that searches for the absence of results.

                // Find the absence of a value in an array
                function invertSearch(array, value) {
                    var i = array.length;
                    while (i-- && array[i] !== value) {
                        return false;
                    }
                    return true;
                }