Cody

# Problem 44281. Check if any duplicates in your data

Solution 1249246

Submitted on 10 Aug 2017 by Ben Cappello
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
x=[1 2 3 6 8 4 9]; n=1; assert(isequal(rept(x),n))

u = 1 2 3 4 6 8 9 n = 1 temp = 0 temp = 1 temp = 0 temp = 1 temp = 0 temp = 1 temp = 0 temp = 1 temp = 0 temp = 1 temp = 0 temp = 1 temp = 0 temp = 1

2   Pass
x=[2 3 6 2 6 2 2 -2 -7]; n=4; assert(isequal(rept(x),n))

u = -7 -2 2 3 6 n = 1 temp = 0 temp = 1 temp = 0 temp = 1 temp = 0 temp = 1 temp = 2 temp = 3 temp = 4 n = 4 temp = 0 temp = 1 temp = 0 temp = 1 temp = 2

3   Pass
x=[2 3 6 2 6 2 2 -2 -7 -7 6 6 6]; n=5; assert(isequal(rept(x),n))

u = -7 -2 2 3 6 n = 1 temp = 0 temp = 1 temp = 2 n = 2 temp = 0 temp = 1 temp = 0 temp = 1 temp = 2 temp = 3 temp = 4 n = 4 temp = 0 temp = 1 temp = 0 temp = 1 temp = 2 temp = 3 temp = 4 temp = 5 n = 5

4   Pass
x=[8 8 8 6 8 8 8]; n=6; assert(isequal(rept(x),n))

u = 6 8 n = 1 temp = 0 temp = 1 temp = 0 temp = 1 temp = 2 temp = 3 temp = 4 temp = 5 temp = 6 n = 6

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!