We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b2847 commit c06ad95Copy full SHA for c06ad95
01_introduction_to_algorithms/c++11/01_binary_search.cpp
@@ -5,7 +5,7 @@ using std::cout;
5
using std::endl;
6
7
template <typename T>
8
-int binary_search(const std::vector<T>& list, const int& item) {
+int binary_search(const std::vector<T>& list, const T& item) {
9
int low = 0;
10
int high = list.size() - 1;
11
0 commit comments