Asif -- In the last problem of the test suite, there are two different paths through the matrix that lead to the same minimal summation.
oh..didn't see that
I've commented out the last test suite.
can u kindly point out the other path u're getting?
The alternate path is:
[1 11 21 22 32 42 43 44 45 55 56 66 76 77 78 79 89 90 100]
Here's another alternate path for the last test suite (magic(10)).
[1 2 3 13 14 24 34 35 45 55 56 57 58 68 69 70 80 90 100]
Find the stride of the longest skip sequence
Rotate and display numbered tile
Remove the two elements next to NaN value
Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
Ripping numbers apart!
generate the matrix
Sieve of Eratosthenes - 02
Rotate a matrix without using rot90
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office