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
|
6014 Discussions
|
Please Login in order to post a comment
I think this is the best way:
Java Solution. Sum the whole array values and at the same time get the min and max values from the array. At the end just substract the min and max values from the sum.
C#:
Here is my c++ solution, you can watch the explanation here : https://youtu.be/2GlHrf4HQPE
Sort, Slice and Reduce