Блог пользователя The_Most_Chalishkanchik

Автор The_Most_Chalishkanchik, история, 11 месяцев назад, По-английски

I often have problems when I need to find a certain 'x' in the position of the first elements in the pair vector. Of course, it's better to write your own binary search. But can someone explain how it works anyway?

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

»
11 месяцев назад, # |
Rev. 2   Проголосовать: нравится +10 Проголосовать: не нравится

They work in the same way as integers. Pairs by default are compared by the first elements, if the first elements are equal then compare by second elements.