In the given question, I wasn’t able to understand why 6 would be the answer. I tried it out and the compiler printed 6. In my understanding the set would be {1,2,5,7,10,12} and since lower bound returns the value of the first number that is >= the key, since no number that matches that for 15 is there I thought it’d return s.end()
Which is why I chose garbage, could you explain why it is 6.