Lower And Upper Bound Function In Cpp