Cody

# Problem 39. Which values occur exactly three times?

Solution 436778

Submitted on 1 May 2014 by Joel
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))

test = 1 threetimes = 1 10 x = 2 5 2 2 7 8 3 3 3 8 8 8 test = 2 threetimes = 1 3 4 y = 2 x = 5 7 8 3 3 3 8 8 8 test = 3 threetimes = 4 5 6 y = 2 3 x = 5 7 8 8 8 8 test = 5 threetimes = 1 x = 7 8 8 8 8 test = 7 threetimes = 1 x = 8 8 8 8

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

test = 1 threetimes = 1 2 3 y = 1 x = Empty matrix: 1-by-0

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

test = -3 threetimes = 3 5 7 y = -3 x = 5 10 10 11 5 5 7 test = 5 threetimes = 1 5 6 y = -3 5 x = 10 10 11 7 test = 7 threetimes = 4 x = 10 10 11