reference is_permutation Test whether range is permutation of another Parameters first1, last1 Input iterators to the initial and final positions of the first sequence. The range used is [first1,last1), which contains all the elements between first1…