I am studying STL (containers at the moment) and was puzzled about when to use std::set and std::unordered_set and what reasons for doing this?
std::set sorts the elements while std::unordered_set leaves the elements as is. If you are required have all the elements sorted out, you should use std::set.