Skip to content

Commit

Permalink
[cpp][15_bsearch] comments on IterT.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam0205 committed Oct 24, 2018
1 parent 7d24600 commit 3cd851d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions c-cpp/15_bsearch/bsearch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

enum class BsearchPolicy { FIRST, LAST, UNSPECIFIED };

// Liam Huang: The algorithm works right with iterators that meet the ForwardIterator requirement,
// but with a bad time complexity. For better performance, iterators should meet
// the RandomAccessIterator requirement.
template <typename IterT,
typename ValueT = typename std::iterator_traits<IterT>::value_type,
typename Compare>
Expand Down

0 comments on commit 3cd851d

Please sign in to comment.