• Tutorials
  • DSA
  • Data Science
  • Web Tech
  • Courses
September 26, 2023 |2.2K Views

PROBLEM OF THE DAY: 25/09/2023 | Maximum Sum Combination

Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Devashish Khare. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Heaps but will also help you build up problem-solving skills.

In this video, we are given two integer arrays A and B of size N each. A sum combination is made by adding one element from array A and another element from array B. Return the maximum K valid sum combinations from all the possible sum combinations.
Note: Output array must be sorted in non-increasing order.

Example :

Input:
N = 2
K = 2
A [ ] = {3, 2}
B [ ] = {1, 4}
Output: {7, 6}

Explanation: 
7 -> (A : 3) + (B : 4)
6 -> (A : 2) + (B : 4)

Give the problem a try before going through the video. All the best!!!

Problem Link: https://practice.geeksforgeeks.org/problems/maximum-sum-combination/1