用Java 的 TreeMap(TreeSet) 配合哨兵实现 C++(lowerBound) 和 python(bisect_left) 中的二分查找。 参考:https://leetcode.cn/circle/discuss/xL7JQq/ 可以通过 TreeSet 中的 lower、floor、ceiling、higher 实现C++ stl 中的 lower_bound 和