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.
- Mini-Max Sum
- Discussions
Mini-Max Sum
Mini-Max Sum
Sort by
recency
|
285 Discussions
|
Please Login in order to post a comment
This might be simple in python
def min_max_sum(arr): # Write your code here1 2 3 4 result = [] for i in range(len(arr)): org = arr[:] org.pop(i) result.append(sum(org)) return f"{min(result)} {max(result)}"
if name == 'main':
python code, simple and easy to understand
Java Solution Easy to understand public static void miniMaxSum(List arr) {
// java code