Search
⌘K

Leetcode 1966. Binary Searchable Numbers in an Unsorted Array

Given an unsorted array, count the elements that are "binary searchable" — values that would be found by standard binary search without sorting, meaning every element to their left is smaller and every element to their right is larger. The core challenge is detecting those positions efficiently using prefix maxima and suffix minima scans.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.