c++ STL algorithm 列表)

來源:互聯網
上載者:User
1. 尋找演算法 (13)    為判斷容器中是否包含某一個值提供
adjacent_find()
binary_search()
count()
count_if()
equal_range()
find()
find_end()
find_first_of()
find_if()
lower_bound()
upper_bound()
search()
search_n()

2. 排序(sorting)和通用(ordering)演算法(14)
提供元素的排序策略。
其中stable演算法保證相等元素的原來順序不變。
inplace_merge()
merge()
nth_element()
partial_sort()
partial_sort_copy()
partition()
random_shuffle()
reverse()
reverse_copy()
rotate()
rotate_copy()
sort()
stable_sort()
stable_partition()

3. 刪除和替換演算法(15)
copy()
copy_backwards()
iter_swap()
remove()
remove_copy()
remove_if()
remove_copy_if()
replace()
replace_copy()
replace_if()
replace_copy_if()
swap()
swap_range()
unique()
unique_copy()

4. 排列組合演算法(2)
提供計算給定集合按一定順序的所有可能的排列組合。
next_permutation()
prev_permutation()

5. 算術演算法(4)
accumulate()
partial_sum()
inner_product()
adjacent_difference()

6. 產生和異變演算法(6)
fill()
fill_n()
for_each()
generate()
generate_n()
transform()

7. 關係演算法(7)
equal()
includes()
lexicographical_compare()
max()
max_element()
min()
min_element()
mismatch()

8. 集合演算法(4)
set_union()        合并2個集合
set_intersection()    取交集
set_difference()       取第一個集合減去第二個集合
set_symmetric_difference()    取只在一個集合中存在的元素集合

9. 堆演算法(4)
make_heap()
pop_heap()
push_heap()
sort_heap()

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.