• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
December 12, 2023 |2.0K Views

PROBLEM OF THE DAY : 11/12/2023 | Max Sum Subarray of size K

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 Array but also build up problem-solving skills.

In this problem, we are given, an array of integers Arr of size N and a number K. Return the maximum sum of a subarray of size K.

NOTE: A subarray is a contiguous part of any given array.

Example :

Input:
N = 4, K = 2
Arr = [100, 200, 300, 400]
Output:
700

Explanation:
Arr3  + Arr4 =700, which is maximum.

Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/subarray-with-0-sum-1587115621/1