Cody

# Problem 2640. Find similar sequences

Solution 1916162

Submitted on 30 Aug 2019 by Graham
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
m = [3 1 5 0 0 3 4 1 5 0 4 2 1 5 0]; srows = [3 1 5 0 0;4 2 1 5 0]; assert(isequal(findsimilar(m),srows))

c = 1 3 5 d = 2 1 3 e = 3 1 4 c = 1 5 d = 2 3 e = 3 4

2   Pass
m = [3 1 5 0 0 1 2 5 0 0 1 3 4 1 5 2 1 5 0 0]; srows = [3 1 5 0 0; 2 1 5 0 0]; assert(isequal(findsimilar(m),srows))

c = 1 5 d = 2 3 e = 1 3 c = 1 3 5 d = 2 1 3 e = 1 2 5 c = 1 5 d = 2 3 e = 2 3

3   Pass
m = [3 1 5 7 0 3 2 5 7 0 3 5 7 2 0 1 5 7 2 0 4 6 7 8 9 4 5 7 8 0 4 5 6 7 8]; srows = [3 1 5 7 0;1 5 7 2 0;4 6 7 8 9;4 5 7 8 0]; assert(isequal(findsimilar(m),srows))

c = 3 5 7 d = 1 3 4 e = 1 3 4 c = 3 5 7 d = 1 3 4 e = 1 2 3 c = 1 5 7 d = 2 3 4 e = 1 2 3 c = 7 d = 4 e = 3 c = 5 7 d = 3 4 e = 2 3 c = 5 7 d = 3 4 e = 2 4

4   Pass
m = [3 1 5 0 0 3 1 6 0 0 3 2 6 0 0 2 1 5 6 0]; srows = m; assert(isequal(findsimilar(m), srows))

c = 1 3 d = 2 1 e = 2 1 c = 3 d = 1 e = 1 c = 1 5 d = 2 3 e = 2 3