We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Warmup
- Mini-Max Sum
- Discussions
Mini-Max Sum
Mini-Max Sum
Sort by
recency
|
5860 Discussions
|
Please Login in order to post a comment
java code snippet
JavaScript
Is it cheating if we sort first?
Python Solution: The idea was to sum it, sort it, then we can just subtract the largest and smallest values from the array to get our answers :) Score is 10
def miniMaxSum(arr): # Write your code here result = sum(arr) arr.sort()
Javascript Correction
function miniMaxSum(arr) { // Write your code here