Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
#include
using namespace std; int main() { vector
numbers = {1, 7, 3, 5, 3, 9, 2}; vector
search = {2, 3, 5}; // Sort the numbers vector sort(numbers.begin(), numbers.end()); // Check if 'search' vector is included in 'numbers' if (includes(numbers.begin(), numbers.end(), search.begin(), search.end())) { cout << "Found"; } else { cout << "Not found"; } return 0; }
Found