PerryThePlaytypus's blog

By PerryThePlaytypus, history, 13 months ago, In English

How would I use these functions for pairs? I mean if I have a pair {a,b} and I would like a pair p = {c,d} such that a < c and b < d. The traditional lower_bound and upper_bound functions only give us a pair whose first value 'c' is greater or equal to 'a' and it doesn't care about b and d. Can I get the former in O(logN)?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it