Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
assert(isequal(look_and_say([1]),[1 1]))
|
2 | Pass |
assert(isequal(look_and_say([1 1 1 1 1]),[5 1]))
s =
1×6 logical array
1 0 0 0 0 1
ii1 =
[]
ii2 =
1
ii3 =
5
NEXT =
5 1
NEXT =
5 1
NEXT =
5 1
NEXT =
5 1
NEXT =
5 1
|
3 | Pass |
assert(isequal(look_and_say([1 3 3 1 5 2 2]),[1 1 2 3 1 1 1 5 2 2]))
s =
1×8 logical array
1 1 0 1 1 1 0 1
ii1 =
1 4 5
ii2 =
2 6
ii3 =
3 7
NEXT =
1 1 2 3
NEXT =
1 1 2 3
NEXT =
1 1 2 3 1 1 1 5 2 2
NEXT =
1 1 2 3 1 1 1 5 2 2
|
4 | Pass |
assert(isequal(look_and_say([8 6 7 5 3 0 9]),[1 8 1 6 1 7 1 5 1 3 1 0 1 9]))
s =
1×8 logical array
1 1 1 1 1 1 1 1
ii1 =
1 2 3 4 5 6 7
ii2 =
[]
ii3 =
[]
|
404 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
278 Solvers
Get the length of a given vector
3571 Solvers
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
512 Solvers
Given a 4x4 matrix, swap the two middle columns
516 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!