STL经典算法集锦

STL经典算法集锦

所谓经典算法是指STL中有一定的复杂性并且又经常用到的算法。其他算法多是较为容易,利用STL操作很容易实现就不在此之列了。

共计15个算法,包括:

1、list::sort

2、heap

3、partition

4、rotate(链表版,数组版,即random_access_iterator、bidirection_iterator)

5、search_n

6、lower_bound

7、upper_bound

8、binary_search

9、next_permutation

10、prev_permutation

11、random_shuffle

12、Introsort(即顺序表的sort)

13、_nth_element

14、Inplace_merge

15、mergesort

将上述算法列出以收藏和稍后将上述亲自实现。

文章导航