Part 8-STL Common Functions
5.1 Commonly used traversal algorithms
5.1.1 for_each
5.1.2 transform
5.2 Common search algorithms
5.2.1 find
5.2.2 find_if
5.2.3 adjacent_find
If there is an interview question about finding adjacent repeated elements, remember to use the adjacent_find algorithm in stl
5.2.4 binary_search
5.2.5 count
5.2.6 count_if
5.3 Commonly used sorting algorithms
5.3.1 sort
More commonly used, requires proficiency
5.3.2 random_shuffle
Summary: The random_shuffle shuffling algorithm is more suitable. Remember to add a random number seed when using it.
5.3.3 merge
Summary: The two containers merged by merge must be an ordered sequence
5.3.4 reverse
5.4 Common copy and replacement algorithms
5.4.1 copy
5.4.2 replace
5.4.3 replace_if
5.4.4 swap
Only elements of the same type can be exchanged