About lower_bound and upper bound stl

Can we appy the lower_bound and upper_bound function for string and character arrays???

hello @sauravzt7
yeah u can,
but all character must present in sorted order

how will answers differ ??

lower bound and upper bound work only on sorted data.

so if ur data is not in sorted order then lower/upper will give some weired results.

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.