Skip to content

Latest commit

 

History

History
4 lines (4 loc) · 293 Bytes

File metadata and controls

4 lines (4 loc) · 293 Bytes
  • sort(v.begin(),v.end()) : O(NlogN) where N=number of elements in vector
  • binary_search(v.begin(),v.end(),val): O(logN). Returns bool value.
  • upper_bound(v.begin(), v.end(), val): O(logN). Returns iterator
  • lower_bound(v.begin(), v.end(), val): O(logN). Returns iterator