What's wrong with using lower_bound? Can someone help?


  • 0
    G

    it always says runtime error to use custom compare function with lower_bound.

    auto iter = lower_bound(intervals.begin(), intervals.end(), newInterval, [](Interval l, Interval r){return l.start < r.start;});
    

    Thanks.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.