very nice commented code!
Thank you Alfonso! (They're my comments.)
Well, very nice commented solution and very nice problem as well!
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
b = [0 0 0 0
0 1 2 0
0 0 0 0];
route_correct = 'WE';
assert(isequal(circumNavigate(b),route_correct))
|
2 | Pass |
%%
b = [0 0 0 0 0 0
0 0 2 0 0 0
0 1 1 1 1 0
0 0 1 0 0 0
0 0 0 0 0 0];
route_correct = 'SEEWWSNWEN';
assert(isequal(circumNavigate(b),route_correct))
|
3 | Pass |
%%
b = [0 0 0 0 0 0 0
0 1 2 0 1 1 0
0 1 1 1 1 1 0
0 0 0 1 0 0 0
0 0 0 0 0 0 0];
route_correct = 'SEENESWWSNWWNE';
assert(isequal(circumNavigate(b),route_correct))
|
4 | Pass |
%%
b = [0 0 0 0 0 0 0
0 1 1 1 1 0 0
0 1 1 1 1 1 0
0 1 2 1 0 0 0
0 0 0 0 0 0 0];
route_correct = 'WNNEEESEWWSW';
assert(isequal(circumNavigate(b),route_correct))
|
Project Euler: Problem 10, Sum of Primes
707 Solvers
376 Solvers
Generate a string like abbcccddddeeeee
234 Solvers
3062 Solvers
413 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!