I am trying to find a simple way to check whether a vector is a subset of another without sorting the order of elements in the vector. Both the vectors contain random number
With no sorting...
template bool isSubsetOrEqual(std::vector const& a, std::vector const& b) { for(auto const& av:a){ if(std::find(b.begin(),b.end(),av)==b.end()) return false; } return true; }