Tuesday, November 20, 2012

Standard Template Library: Algorithm

Algorithms (in <algorithm>) operate on containers, including strings. They may not always be the fastest option but they're often the easiest. They fall into 6 groups:
  1.  Search algorithms - search(), count_if(), etc.
  2.  Sorting algorithms - sort(), merge(), etc.
  3.  Deletion algorithms - remove(), unique(), etc.
  4.  Numeric algorithms - partial_sum(), inner_product(), etc.
  5.  Generation algorithms - generate(), for_each(), etc.
  6.  Relational algorithms - equal(), min(), etc.

No comments:

Post a Comment