This is not a valid solution. It does not meet the requirement of elements in each subset being sorted. Try the input [1 3 2] and it does not give sorted subsets.
1067 Solvers
1899 Solvers
409 Solvers
Generate a random matrix A of (1,-1)
219 Solvers
Create an index-powered vector
381 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!