Here it is asked about lower_bound(15) but the largest available no. given in set is 12. then why is it point to some valid position.
I thought that it might give some garbage value.
QUIZ STL QUESTION NO> 7
Hello @rai.tejas1998
Answer must be 6.
s.end()= number of elements in the set.
In the case when the element being searched is greater than the maximum element the set the returned value is number of elements in the set which in this case is 6.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.