Lower/Upper Bounds in c++ : set

Правка en1, от ISuckAtLife, 2020-05-29 18:12:37

So, Just few hours back I learned that complexity of lower_bound(st.begin(),st.end(),val) is much much higher than st.lower_bound(val). where st is normal stl set in c++

As you can see the only difference between 81895138 and this 81894342 is the one mentioned above.

I thought I should share it with the community as me myself and my few friends didn't know about this.

I don't know the reasons for this, it would be really helpful if someone could give the reasons and actual complexity of lower_bound(st.begin(),st.end(),val).

Теги #set, lower bound, upper_bound, #c++

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ISuckAtLife 2020-05-29 18:12:37 609 Initial revision (published)