Skip to content

Commit

Permalink
Merge pull request pezy#81 from sanerror/master
Browse files Browse the repository at this point in the history
fix ex9_1(a)
  • Loading branch information
pezy authored Oct 8, 2016
2 parents e6d9631 + 03e15ca commit df0cc50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ch09/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
>- (b) Read an unknown number of words. Always insert new words at the back. Remove the next value from the front.
>- (c) Read an unknown number of integers from a file. Sort the numbers and then print them to standard output.
- (a) `std::set` is the best. now, we can select `vector` or `deque`, better than `list`, cause we don't need insert or delete elements in the middle.
- (a) `std::set` is the best. now, we can select `list`, better than `vector` or `deque`, cause we may need to insert elements in the middle frequently to keep sorted alphabetical.
- (b) `deque`. If the program needs to insert or delete elements at the front and the back, but not in the middle, use a deque
- (c) `vector`, no need that insert or delete at the front or back. and If your program has lots of small elements and space overhead matters, don’t use list or forward_list.

Expand Down

0 comments on commit df0cc50

Please sign in to comment.