PROBLEM OF THE DAY : 07/01/2024 | Split Array Largest Sum
source link: https://www.geeksforgeeks.org/videos/problem-of-the-day-07012024-split-array-largest-sum/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PROBLEM OF THE DAY : 07/01/2024
Welcome to the daily solving of our PROBLEM OF THE DAY with Siddharth Hazra 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 Binary Search but also build up problem-solving skills.
In this problem, we are given an array arr[] of N elements and a number K., split the given array into K subarrays such that the maximum subarray sum achievable out of K subarrays formed is the minimum possible. Find that possible subarray sum.
Example :
Input:
N = 4, K = 3
arr[] = {1, 2, 3, 4}
Output: 4
Explanation:
Optimal Split is {1, 2}, {3}, {4}.The maximum sum of all subarrays is 4, which is minimum possible for 3 splits.
Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/split-array-largest-sum--141634/1
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK