Cody

Solution 1992660

Submitted on 27 Oct 2019 by Nikolaos Nikolaou
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 = 10; y=2:10; y_correct = 1; assert(isequal(find_missing_number(x,y),y_correct))

res = 1

2   Pass
x = 100; y=1:99; y_correct = 100; assert(isequal(find_missing_number(x,y),y_correct))

res = 100

3   Pass
x = 1000; y=1:1000; y(end/2)=[]; y_correct = 500; assert(isequal(find_missing_number(x,y),y_correct))

res = 500

4   Pass
x = 2; y=2; assert(isequal(find_missing_number(x,y),1))

res = 1

5   Pass
x = 2; y=1; assert(isequal(find_missing_number(x,y),x))

res = 2

6   Pass
x = 100000; y=1:x; y(end-3)=[]; assert(isequal(find_missing_number(x,y),x-3))

res = 99997

7   Pass
x = 100000; for b=1:100 y=1:x; y=y(randperm(x)); val=randi([1 x]); y_correct = y(val); y(val)=[]; assert(isequal(find_missing_number(x,y),y_correct)) end

res = 26523 res = 82219 res = 14604 res = 60151 res = 65465 res = 53114 res = 29222 res = 23674 res = 59356 res = 15041 res = 72989 res = 80083 res = 77239 res = 2858 res = 73346 res = 75049 res = 65010 res = 15941 res = 65698 res = 27776 res = 76293 res = 35518 res = 83001 res = 95476 res = 41529 res = 12237 res = 75741 res = 13727 res = 87397 res = 44739 res = 90432 res = 91504 res = 16969 res = 57003 res = 52264 res = 13403 res = 3451 res = 66461 res = 15346 res = 30553 res = 24394 res = 71090 res = 90316 res = 48931 res = 11160 res = 57705 res = 49033 res = 42724 res = 26233 res = 73790 res = 11417 res = 7845 res = 277 res = 95298 res = 67702 res = 44207 res = 86333 res = 23037 res = 25479 res = 59926 res = 94372 res = 54666 res = 59013 res = 9998 res = 84461 res = 2228 res = 37524 res = 33617 res = 52829 res = 25753 res = 41562 res = 14742 res = 41820 res = 9090 res = 27998 res = 4486 res = 10206 res = 28091 res = 74714 res = 77728 res = 81213 res = 85713 res = 90348 res = 78226 res = 81233 res = 16536 res = 82748 res = 96017 res = 6891 res = 42110 res = 18588 res = 42231 res = 10432 res = 51560 res = 37045 res = 16306 res = 48738 res = 1493 res = 13172 res = 23432