c++中的algorithm都有哪些方法!

 我来答
写代码的卖鱼人
2009-11-06 · TA获得超过354个赞
知道小有建树答主
回答量:259
采纳率:100%
帮助的人:252万
展开全部
C++ Algorithms
Display all entries for C++ Algorithms on one page, or view entries individually:

accumulate sum up a range of elements
adjacent_difference compute the differences between adjacent elements in a range
adjacent_find finds two items that are adjacent to eachother
binary_search determine if an element exists in a certain range
copy copy some range of elements to a new location
copy_backward copy a range of elements in backwards order
copy_n copy N elements
count return the number of elements matching a given value
count_if return the number of elements for which a predicate is true
equal determine if two sets of elements are the same
equal_range search for a range of elements that are all equal to a certain element
fill assign a range of elements a certain value
fill_n assign a value to some number of elements
find find a value in a given range
find_end find the last sequence of elements in a certain range
find_first_of search for any one of a set of elements
find_if find the first element for which a certain predicate is true
for_each apply a function to a range of elements
generate saves the result of a function in a range
generate_n saves the result of N applications of a function
includes returns true if one set is a subset of another
inner_product compute the inner product of two ranges of elements
inplace_merge merge two ordered ranges in-place
is_heap returns true if a given range is a heap
is_sorted returns true if a range is sorted in ascending order
iter_swap swaps the elements pointed to by two iterators
lexicographical_compare returns true if one range is lexicographically less than another
lexicographical_compare_3way determines if one range is lexicographically less than or greater than another
lower_bound search for the first place that a value can be inserted while preserving order
make_heap creates a heap out of a range of elements
max returns the larger of two elements
max_element returns the largest element in a range
merge merge two sorted ranges
min returns the smaller of two elements
min_element returns the smallest element in a range
mismatch finds the first position where two ranges differ
next_permutation generates the next greater lexicographic permutation of a range of elements
nth_element put one element in its sorted location and make sure that no elements to its left are greater than any elements to its right
partial_sort sort the first N elements of a range
partial_sort_copy copy and partially sort a range of elements
partial_sum compute the partial sum of a range of elements
partition divide a range of elements into two groups
pop_heap remove the largest element from a heap
prev_permutation generates the next smaller lexicographic permutation of a range of elements
push_heap add an element to a heap
random_sample randomly copy elements from one range to another
random_sample_n sample N random elements from a range
random_shuffle randomly re-order elements in some range
remove remove elements equal to certain value
remove_copy copy a range of elements omitting those that match a certian value
remove_copy_if create a copy of a range of elements, omitting any for which a predicate is true
remove_if remove all elements for which a predicate is true
replace replace every occurrence of some value in a range with another value
replace_copy copy a range, replacing certain elements with new ones
replace_copy_if copy a range of elements, replacing those for which a predicate is true
replace_if change the values of elements for which a predicate is true
reverse reverse elements in some range
reverse_copy create a copy of a range that is reversed
rotate move the elements in some range to the left by some amount
rotate_copy copy and rotate a range of elements
search search for a range of elements
search_n search for N consecutive copies of an element in some range
set_difference computes the difference between two sets
set_intersection computes the intersection of two sets
set_symmetric_difference computes the symmetric difference between two sets
set_union computes the union of two sets
sort sort a range into ascending order
sort_heap turns a heap into a sorted range of elements
stable_partition divide elements into two groups while preserving their relative order
stable_sort sort a range of elements while preserving order between equal elements
swap swap the values of two objects
swap_ranges swaps two ranges of elements
transform applies a function to a range of elements
unique remove consecutive duplicate elements in a range
unique_copy create a copy of some range of elements that contains no consecutive duplicates
upper_bound searches for the last possible location to insert an element into an ordered range
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
霜寄秀9
2009-11-06 · 超过28用户采纳过TA的回答
知道答主
回答量:124
采纳率:0%
帮助的人:0
展开全部
多了,蛮力,回溯,递归,图也有很多,建议看算法书
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
sylecn
2009-11-06 · TA获得超过2991个赞
知道大有可为答主
回答量:1169
采纳率:57%
帮助的人:706万
展开全部

参考资料: http://www.cplusplus.com/reference/algorithm/

本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式