Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
std::vector<int> v = {1, 2, 3, 4, 5};
bool found = std::binary_search(v.begin(), v.end(), 3);
std::cout << (found ? "Found" : "Not found");
return 0;
}Coding works best on desktop or with an external keyboard.