Cody

# Problem 39. Which values occur exactly three times?

Solution 1987887

Submitted on 23 Oct 2019 by Le Manh Long Le Manh Long
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 5 2 2 7 8 3 3 1 3 8 8 8]; y_correct = [2 3]; assert(isequal(threeTimes(x),y_correct))

t = 1 2 3 5 7 8 h = 14 k = 6 y = [] f = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 c = 2 f = 2 2 2 2 2 2 2 2 2 2 2 2 2 2 c = 3 y = 2 f = 3 3 3 3 3 3 3 3 3 3 3 3 3 3 c = 3 y = 2 3 f = 5 5 5 5 5 5 5 5 5 5 5 5 5 5 c = 1 f = 7 7 7 7 7 7 7 7 7 7 7 7 7 7 c = 1 f = 8 8 8 8 8 8 8 8 8 8 8 8 8 8 c = 4

2   Pass
x = [1 1 1]; y_correct = [1]; assert(isequal(threeTimes(x),y_correct))

t = 1 h = 3 k = 1 y = [] f = 1 1 1 c = 3 y = 1

3   Pass
x = [5 10 -3 10 -3 11 -3 5 5 7]; y_correct = [-3 5]; assert(isequal(threeTimes(x),y_correct))

t = -3 5 7 10 11 h = 10 k = 5 y = [] f = -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 c = 3 y = -3 f = 5 5 5 5 5 5 5 5 5 5 c = 3 y = -3 5 f = 7 7 7 7 7 7 7 7 7 7 c = 1 f = 10 10 10 10 10 10 10 10 10 10 c = 2 f = 11 11 11 11 11 11 11 11 11 11 c = 1