Regarding comparator of lower bound

I want to ask that the key whose lower bound we have to search will always come in parameter “b” in compare or comparator function and elements of array will come in “a” in compare or comparator function

If you run same code on online IDE it will give you just opposite result. So you can’t say b will always contain the key.

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.