RosettaCodeData/Task/Binary-search/C++/binary-search-5.cpp

2 lines
103 B
C++

int *ptr = std::upper_bound(array, array+len, what); // a custom comparator can be given as fourth arg