Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> numbers = {1, 7, 3, 5, 9, 2}; vector<int> other = {9, 7, 5, 3, 2, 1}; if (is_permutation(numbers.begin(), numbers.end(), other.begin())) { cout << "Permutation found"; } else { cout << "No permutation found"; } return 0; }
Permutation found