I have to find the permutation of vector of integers. I need to implement and interleave function
vector<vector<int> > interleave(int x , const vector<int> & v); Using interleave we can implement a permute function.

vector<vector<int> > permute(size_t n); that returns a vector containing of the first n positive nos.

I donot how to start. Need help

algorithm should be recursive

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.