Why are we doing -1 at the end of the lower_bound() function

shouldn’t lb be like
lb = address(6)-address(0)-1;
lb = 5;
??

@Manvik-Arya-4391661007540658 by using the compare function, we are making it’s funcionality like upper_bound() function. So, we will get the iterator to the first element that is strictly bigger than the key. Therefore, to get the iterator to the smaller iterator than that, we have to subtract 1.

Please mark the doubt as resolved in case of no further queries.