The pass criteria should not be specific to the number of spaces that are left instead of the omitted state names. This beats the purpose of the exercise. There should either be no extra spaces left in the solutions, or it should not be specific to how the author of the challenge solved the problem.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
s1 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming';
s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada Ohio Oklahoma Oregon Pennsylvania Tennessee Texas Utah Vermont Virginia Washington Wisconsin Wyoming';
assert(isequal(s2,refcn(s1)))
|
2 | Pass |
s1 = 'New York Nevada Texas Utah Vermont West Virginia Virginia';
s2 = ' Nevada Texas Utah Vermont Virginia';
assert(isequal(s2,refcn(s1)))
|
Extract leading non-zero digit
1205 Solvers
927 Solvers
Make an awesome ramp for a tiny motorcycle stuntman
334 Solvers
260 Solvers
556 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!