Tag: c++

  • Min Max Sum from hackerrank on C++

    Min Max Sum from hackerrank on C++

    Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum and maximum values as a single line of two space-separated long integers. Full question is over here:hackerrank Working solution #include <bits/stdc++.h> using namespace std; void miniMaxSum(vector <int> arr)…