Ordering of the result

For ordering Sort the given vector
sort(A.begin(),A.end())

and sort the result vector of vector also.
this should do it.

Click here to start solving coding interview questions