32. STL Algorithms

Form is liberating.

– Engineer’s proverb



Sequences; Policy Arguments; Complexity

Nonmodifying Sequence Algorithms

for_each(); Sequence Predicates; count(); find(); equal() and mismatch(); search()

Modifying Sequence Algorithms

copy(); unique(); remove(), reverse(), and replace(); rotate(), random_shuffle(), and partition(); Permutations; fill(); swap()

Sorting and Searching

Binary Search; merge(); Set Algorithms; Heaps; lexcographical_compare()

Min and Max


32.1. Introduction

This chapter presents the STL algorithms. The STL consists of the iterator, container, algorithm, and function object parts of the standard library. The rest of the STL is presented in Chapter 31 and Chapter ...

Get The C++ Programming Language, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.