Sahaj.blogs

Day page

2 Jan 2024

Study

C++ · STL: algorithms

The <algorithm> and <numeric> toolkit: sort with comparators, find_if, count_if, accumulate, transform, and min/max.

  • STL algorithms work on iterator ranges, so the same sort or find works on any container.
  • Most hand-written loops have a named algorithm that says what you mean more clearly.

Read the post →