From e276dac7d1896f3745a73141bbe8f69e2331bb11 Mon Sep 17 00:00:00 2001 From: ambiguoustexture <59325440+ambiguoustexture@users.noreply.github.com> Date: Tue, 1 Mar 2022 22:59:05 +0800 Subject: [PATCH] book: re-compose words to avoid out of pdf's margin (#229) --- book/en-us/04-containers.md | 2 +- book/zh-cn/04-containers.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/book/en-us/04-containers.md b/book/en-us/04-containers.md index fe1d530..36acbb3 100644 --- a/book/en-us/04-containers.md +++ b/book/en-us/04-containers.md @@ -118,7 +118,7 @@ And select the appropriate location to insert into the container. When traversin The elements in the unordered container are not sorted, and the internals is implemented by the Hash table. The average complexity of inserting and searching for elements is `O(constant)`, Significant performance gains can be achieved without concern for the order of the elements inside the container. -C++11 introduces two sets of unordered containers: `std::unordered_map`/`std::unordered_multimap` and +C++11 introduces two unordered containers: `std::unordered_map`/`std::unordered_multimap` and `std::unordered_set`/`std::unordered_multiset`. Their usage is basically similar to the original `std::map`/`std::multimap`/`std::set`/`set::multiset` diff --git a/book/zh-cn/04-containers.md b/book/zh-cn/04-containers.md index e3aded4..b884ffd 100644 --- a/book/zh-cn/04-containers.md +++ b/book/zh-cn/04-containers.md @@ -115,7 +115,7 @@ std::sort(arr.begin(), arr.end()); 而无序容器中的元素是不进行排序的,内部通过 Hash 表实现,插入和搜索元素的平均复杂度为 `O(constant)`, 在不关心容器内部元素顺序时,能够获得显著的性能提升。 -C++11 引入了两组无序容器:`std::unordered_map`/`std::unordered_multimap` 和 +C++11 引入了的两组无序容器分别是:`std::unordered_map`/`std::unordered_multimap` 和 `std::unordered_set`/`std::unordered_multiset`。 它们的用法和原有的 `std::map`/`std::multimap`/`std::set`/`set::multiset` 基本类似,