sets;
s.insert(1);
s.insert(5);
s.insert(7);
s.insert(2);
s.insert(12);
s.insert(10);
for(auto i:s)
cout<<i<<" ";
cout<<endl;
auto it = s.lower_bound(15);
cout<< *it <<endl;
As the lower_bound returns the pointer equals to or just greater than that element, if the element doesn’t found it returns the end of the set, but it here answer is 6.Can you explain why?