Problem 44303. Find the sum of the largest two elements in a vector
Solution Stats
Problem Comments
-
1 Comment
goc3
on 8 Sep 2017
Additional test cases have been added.
Solution Comments
-
2 Comments
yurenchu
on 6 Sep 2017
This would fail when the largest two elements are equal to eachother (for example, when x = [1, 1, 2, 3, 4, 5, 5, 5, 80, 80]).
Erik Luiten
on 7 Sep 2017
Yes you are correct, i have adjusted my code in 1264109
Problem Recent Solvers99
Suggested Problems
-
4842 Solvers
-
Project Euler: Problem 10, Sum of Primes
1327 Solvers
-
304 Solvers
-
Determine if a row vector has NaN
115 Solvers
-
328 Solvers
More from this Author18
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!