1. Engineering
  2. Computer Science
  3. i need to write a function that returns true if...

Question: i need to write a function that returns true if...

Question details

I need to write a function that returns true if 2 arrays are permutation and false if not.

My function needs to have this header " bool areIdenticalNotSorted(const vector<int> &A, const vector<int> &B); "

Problem 9. Are identical not sorted? Given two vectors of integers A and B (not sorted). Write a function that determines whether A is a permutation of B (have the same elements as B, but the items might be in a different order). Assume that maximum of A is a relatively small number. Your function will return true if A is a permutation of B; otherwise, it will return false. You need to write the following function with the exact header as shown: bool areldenticalNotSorted(const vector<int> &A, const vector<int> &B);

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution