Cody

Solution 1683306

Submitted on 29 Nov 2018 by Alan
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
x =[ 3 2 2 3 6 9 8 4]; dif_correct =76308633; assert(isequal(difference(x),dif_correct))

2   Pass
x =[ 3 2 2 0 0 4]; dif_correct =429966; assert(isequal(difference(x),dif_correct))

3   Pass
x =[1 1 1]; dif_correct =429966; assert(isequal(difference(x),dif_correct))

dif = 429966

4   Pass
x =[1 2 3 3 2 1]; dif_correct = 219978; assert(isequal(difference(x),dif_correct))

Suggested Problems

More from this Author1