June 2017
Intermediate to advanced
532 pages
12h 59m
English
These are the search algorithms we have used in this recipe:
| Algorithm | Purpose |
| std::find | Accepts a search range and a comparison value as arguments. Returns an iterator that points to the first item equal to the comparison value. Searches linearly. |
| std::find_if | Works like std::find but uses a predicate function instead of a comparison value. |
| std::binary_search | Accepts a search range and a comparison value as arguments. Performs a binary search and returns true if the range contains that value. |
| std::lower_bound | Accepts a search range and a comparison value, and then performs a binary search for the first item that is not smaller than the comparison value. Returns an iterator pointing to that item. |
| std::upper_bound ... |
Read now
Unlock full access