Explain the correct answer

Can you please explain me correct answers of Q 7, Q 11 and Q 13

@HemantKumar can you clearly mention the names of the questions.

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.

@HemantKumar the q 7 is using lower bound, function, lower bound returns the position of first element that is not smaller than given element in sorted array,After sorting the array, array will be 0 1 1 4 5, and element in lower bound is 3, so it will return the position of 4

@HemantKumar next question is upper bound, upper bound is similar to lower bound, but it returns the position of first element greater than given element. 10 20 30 30 40 50 , it will return position of 40.

@HemantKumar stl priority_queue user defined comparator
in this we are providing a custom comparator to the priority queue(like we do for sort function sometimes)
It will first compare on the basis of second, second of pair are equal then it will compare them on the basis of first.
Answer be will 10 2

stl set iterator returned by insert

insert() returns a pair of iterator and bool, so the pair ret will have 10, 0
If this resolves your doubt mark it as resolved.