Cody

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

Solution 3017968

Submitted on 1 Oct 2020 by James
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))

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

### Community Treasure Hunt

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

Start Hunting!