1

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?

user3524337
  • 462
  • 6
  • 17

1 Answers1

1

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.

William Lew
  • 485
  • 6
  • 17