O'Reilly logo

The C++ Programming Language, Fourth Edition by Bjarne Stroustrup

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

32. STL Algorithms

Form is liberating.

– Engineer’s proverb

Introduction

Algorithms

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

Advice

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required