Cody

Problem 1888. Get ranking of a combination

Solution 2929198

Submitted on 9 Sep 2020 by pign_an
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
vec = [1 2 3]; y_correct = 1; assert(isequal(get3HCRank(vec),y_correct))

2   Pass
vec = [1 2 4]; y_correct = 2; assert(isequal(get3HCRank(vec),y_correct))

3   Pass
vec = [3 5 8]; y_correct = 133; assert(isequal(get3HCRank(vec),y_correct))

4   Pass
vec = [5 9 11]; y_correct = 222; assert(isequal(get3HCRank(vec),y_correct))

Suggested Problems

More from this Author52

Community Treasure Hunt

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

Start Hunting!