## 24.4.2 Transformations - `sort`

- Provides for rapid searching
- `list` provides sorting method
  - `sort` needs iterator subscripts
  - `list` doesn't support them
- `set` and `map` are already in order, can't be sorted
- To sort `vector`, `deque`, or array:

> `vector<int> a(10);
> // Create list of random numbers
> generate(a.begin(), a.end(), rand);
> sort(a.begin(), a.end()); // Then sort them`

prev |top |next