OSDN Git Service

Apply suggestions from code review
authorJacob Zhong <zyxin@umich.edu>
Fri, 6 Sep 2019 01:30:59 +0000 (21:30 -0400)
committerGitHub <noreply@github.com>
Fri, 6 Sep 2019 01:30:59 +0000 (21:30 -0400)
Co-Authored-By: ouuan <y___o___u@126.com>
docs/lang/csl/algorithm.md
docs/lang/csl/associative-container.md

index 9a49c33..fbcd3ec 100644 (file)
@@ -5,7 +5,7 @@ STL 提供了大约 100 个实现算法的模版函数,基本都包含在 `<al
 -    `find` :顺序查找。 `find(v.begin(), v.end(), value)` ,其中 `value` 为需要查找的值。
 -    `find_end` :逆序查找。 `find_end(v.begin(), v.end(), value)` 。
 -    `reverse` :翻转数组、字符串。 `reverse(v.begin(), v.end())` 或 `reverse(a + begin, a + end)` 。
--    `unique` :去除容器中相邻的重复元素。 `unique(v.begin(), v.end())` 或 `unique(a + begin, a + end)` 。与 `sort` 结合使用可以实现完整容器去重。
+-    `unique` :去除容器中相邻的重复元素。 `unique(ForwardIterator first, ForwardIterator last)` ,返回值为指向 **去重后** 容器结尾的迭代器,原容器大小不变。与 `sort` 结合使用可以实现完整容器去重。
 -    `random_shuffle` :随机地打乱数组。 `random_shuffle(v.begin(), v.end())` 或 `random_shuffle(v + begin, v + end)` 。
 
 ## 排序相关
index 1ef2f83..a589218 100644 (file)
@@ -15,7 +15,7 @@
 map<Key, T> yourMap;
 ```
 
-其中, `Key` 是键的类型, `T` 是值的类型,下面是使用 `map` 的特化
+其中, `Key` 是键的类型, `T` 是值的类型,下面是使用 `map` 的实例
 
 ```cpp
 map<string, int> mp;