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.
is good, but for the given problem we have to solve the algorithm firt, for example {1,2,3,4,5}
Solution:
2+3+4+5=14
1+3+4+5=13
1+2+4+5=12
1+2+3+5=11
1+2+3+4=10
Then we have to find the min&max{14,13,12,11,10}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →
is good, but for the given problem we have to solve the algorithm firt, for example {1,2,3,4,5} Solution: 2+3+4+5=14 1+3+4+5=13 1+2+4+5=12 1+2+3+5=11 1+2+3+4=10 Then we have to find the min&max{14,13,12,11,10}