By default, lower_bound function returns the memory address of the element >= key value.
So, to avoid that we wrote the compare function so that we modify the comparison and return the memory address of the element less than equal to key.
But, still we have to subtract 1 at the end, Can you explain this?