<= k, say given by
kis an integer, then we can also solve for number of elements
= k, given by
eq(k) := leq(k) - leq(k - 1).
<=kcan be implement as some kind of prefix sum data structure plus binary search, which is much less error prone to hack up than exact equality.