You are given an array of numbers from 1 to n with two missing numbers.
Return the two missing numbers.
Input: x=[5 2 0 1 0]; %n=5
Output: y=[3 4]; % [4 3] is not accepted
Have fun.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers66
Suggested Problems
-
Find the sum of all the numbers of the input vector
54213 Solvers
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15783 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
884 Solvers
-
Replace every 3rd element in a vector with 4
266 Solvers
-
Sum the squares of numbers from 1 to n
259 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!