Cody

# Problem 46573. Determine the winner of a goofy golf tournament

Solution 2922340

Submitted on 7 Sep 2020 by Tim
• Size: 25
• This is the leading solution.
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 = [81 78 68 71 74 86 77 76]; winner_correct = 5; assert(isequal(goofyTournament(x),winner_correct))

2   Pass
x = [72 74 75 65 67 70 71 80 78 79 80 71]; winner_correct = 6; assert(isequal(goofyTournament(x),winner_correct))

3   Pass
x = [85 83 81 79 77 67 66 72 73 74 71 82]; winner_correct = 11; assert(isequal(goofyTournament(x),winner_correct))

4   Pass
x = [71 68 70 78 75 73 70 70 72 72 75 72]; winner_correct = 1; assert(isequal(goofyTournament(x),winner_correct))

5   Pass
x = 67+randperm(20); winner_correct = find(x==70); assert(isequal(goofyTournament(x),winner_correct))

### Community Treasure Hunt

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

Start Hunting!