Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [81 78 68 71 74 86 77 76];
winner_correct = 5;
assert(isequal(goofyTournament(x),winner_correct))
a =
74
winner =
5
|
2 | Pass |
x = [72 74 75 65 67 70 71 80 78 79 80 71];
winner_correct = 6;
assert(isequal(goofyTournament(x),winner_correct))
a =
70
winner =
6
|
3 | Pass |
x = [85 83 81 79 77 67 66 72 73 74 71 82];
winner_correct = 11;
assert(isequal(goofyTournament(x),winner_correct))
a =
71
winner =
11
|
4 | Pass |
x = [71 68 70 78 75 73 70 70 72 72 75 72];
winner_correct = 1;
assert(isequal(goofyTournament(x),winner_correct))
a =
71
winner =
1
|
5 | Pass |
x = 67+randperm(20);
winner_correct = find(x==70);
assert(isequal(goofyTournament(x),winner_correct))
a =
70
winner =
20
|
5833 Solvers
Back to basics 20 - singleton dimensions
254 Solvers
We love vectorized solutions. Problem 1 : remove the row average.
547 Solvers
There are 10 types of people in the world
311 Solvers
405 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!