lower_bound、upper_bound

透過二分搜尋法,在範圍中找出「>(up)」或「≥(low)」val 的最小 iterator。

lower_bound(v.begin(), v.end(), val);
發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *