this not a good solution but good enough for the test cases
407 Solvers
First non-zero element in each column
601 Solvers
522 Solvers
428 Solvers
1133 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!