Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Interview Problems on DP
  • Practice DP
  • MCQs on DP
  • Tutorial on Dynamic Programming
  • Optimal Substructure
  • Overlapping Subproblem
  • Memoization
  • Tabulation
  • Tabulation vs Memoization
  • 0/1 Knapsack
  • Unbounded Knapsack
  • Subset Sum
  • LCS
  • LIS
  • Coin Change
  • Word Break
  • Egg Dropping Puzzle
  • Matrix Chain Multiplication
  • Palindrome Partitioning
  • DP on Arrays
  • DP with Bitmasking
  • Digit DP
  • DP on Trees
  • DP on Graph
Open In App
Next Article:
Maximum sum two non-overlapping subarrays of given size
Next article icon

Max sum of M non-overlapping subarrays of size K

Last Updated : 24 Feb, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Given an array and two numbers M and K. We need to find the max sum of sums of M subarrays of size K (non-overlapping) in the array. (Order of array remains unchanged). K is the size of subarrays and M is the count of subarray. It may be assumed that size of array is more than m*k. If total array size is not multiple of k, then we can take partial last array.

Examples :  

Input: N = 7, M = 3, K = 1 , arr[] = {2, 10, 7, 18, 5, 33, 0};
Output: 61
Explanation: 3 Max sum subarrays of size 1 are 33, 18, 10

Input: N = 4, M = 2, K = 2 arr[] = {3, 2, 100, 1};
Output: 106
Explanation: 2 Max Sum Subarrays of size 2 are: (3, 2), (100, 1)

Naive Recursive Solution

We consider all subarray of size k, compute their sums and then make recursive calls based on two choices

  • Include the current subarray
  • Exclude the current subarray

The following are detailed steps.

  1. We create a presum array, which contains in each index sum of all elements from ‘index‘ to ‘index + K’ in the given array. And size of the sum array will be n+1-k.  We can compute presum[i] using presum[i-1] using window sliding.
  2. Now if we include the subarray of size k, then we can not include any of the elements of that subarray again in any other subarray as it will create overlapping subarrays. So we make recursive call by excluding the k elements of included subarray. 
  3. if we exclude a subarray then we can use the next k-1 elements of that subarray in other subarrays so we will make recursive call by just excluding the first element of that subarray. 
  4. At last return the max(included sum, excluded sum). 

Below is the implementation of the above approach:

C++
// C++ program to find Max sum of M non-overlapping // subarray of size K in an Array #include <bits/stdc++.h> using namespace std;  // calculating presum of array. presum[i] // is going to store prefix sum of subarray // of size k beginning with arr[i] void calculatePresumArray(int presum[],                 int arr[], int n, int k) {         for (int i=0; i<k; i++)        presum[0] += arr[i];      // store sum of array index i to i+k      // in presum array at index i of it.     for (int i = 1; i <= n - k; i++)         presum[i] += presum[i-1] + arr[i+k-1] -                                    arr[i-1]; }  // calculating maximum sum of m non overlapping array int maxSumMnonOverlappingSubarray(int presum[],               int m, int size, int k, int start) {     // if m is zero then no need any array     // of any size so return 0.     if (m == 0)         return 0;      // if start is greater then the size     // of presum array return 0.     if (start > size - 1)         return 0;      int mx = 0;      // if including subarray of size k     int includeMax = presum[start] +              maxSumMnonOverlappingSubarray(presum,                         m - 1, size, k, start + k);      // if excluding element and searching      // in all next possible subarrays     int excludeMax =              maxSumMnonOverlappingSubarray(presum,                             m, size, k, start + 1);      // return max     return max(includeMax, excludeMax); }  // Driver code int main() {     int arr[] = { 2, 10, 7, 18, 5, 33, 0 };     int n = sizeof(arr)/sizeof(arr[0]);           int m = 3, k = 1;      int presum[n + 1 - k] = { 0 };     calculatePresumArray(presum, arr, n, k);      // resulting presum array will have a size = n+1-k     cout << maxSumMnonOverlappingSubarray(presum,                                m, n + 1 - k, k, 0);      return 0; } 
Java
// Java program to find Max sum  // of M non-overlapping subarray // of size K in an Array  import java.io.*;  class GFG  { // calculating presum of array.  // presum[i] is going to store  // prefix sum of subarray of  // size k beginning with arr[i] static void calculatePresumArray(int presum[],                                  int arr[],                                   int n, int k) {      for (int i = 0; i < k; i++)     presum[0] += arr[i];      // store sum of array index i to i+k      // in presum array at index i of it.     for (int i = 1; i <= n - k; i++)      presum[i] += presum[i - 1] + arr[i + k - 1] -                                   arr[i - 1]; }  // calculating maximum sum of // m non overlapping array static int maxSumMnonOverlappingSubarray(int presum[],                                          int m, int size,                                           int k, int start) {     // if m is zero then no need      // any array of any size so     // return 0.     if (m == 0)         return 0;      // if start is greater then the      // size of presum array return 0.     if (start > size - 1)         return 0;      int mx = 0;      // if including subarray of size k     int includeMax = presum[start] +              maxSumMnonOverlappingSubarray(presum,                       m - 1, size, k, start + k);      // if excluding element and searching      // in all next possible subarrays     int excludeMax =              maxSumMnonOverlappingSubarray(presum,                           m, size, k, start + 1);      // return max     return Math.max(includeMax, excludeMax); }  // Driver code public static void main (String[] args)  {     int arr[] = { 2, 10, 7, 18, 5, 33, 0 };     int n = arr.length;     int m = 3, k = 1;     int presum[] = new int[n + 1 - k] ;     calculatePresumArray(presum, arr, n, k);          // resulting presum array     // will have a size = n+1-k     System.out.println(maxSumMnonOverlappingSubarray(presum,                                         m, n + 1 - k, k, 0)); } } 
Python
# Python3 program to find max sum of M non-overlapping # subarrays of size K in an array  # Function to calculate prefix sum of the array def calculatePresumArray(presum, arr, n, k):     for i in range(k):         presum[0] += arr[i]      # Store sum of subarray starting at index i     for i in range(1, n - k + 1):         presum[i] = presum[i - 1] + arr[i + k - 1] - arr[i - 1]  # Function to calculate maximum sum of M non-overlapping subarrays def maxSumMnonOverlappingSubarray(presum, m, size, k, start):     if m == 0:         return 0      if start > size - 1:         return 0      # Include current subarray     includeMax = presum[start] + maxSumMnonOverlappingSubarray(presum, m - 1, size, k, start + k)      # Exclude current subarray and check next possibility     excludeMax = maxSumMnonOverlappingSubarray(presum, m, size, k, start + 1)      return max(includeMax, excludeMax)  # Driver function if __name__ == "__main__":     arr = [2, 10, 7, 18, 5, 33, 0]     n = len(arr)     m, k = 3, 1      # Initialize prefix sum array     presum = [0 for _ in range(n + 1 - k)]     calculatePresumArray(presum, arr, n, k)      # Compute and print maximum sum of M non-overlapping subarrays     print(maxSumMnonOverlappingSubarray(presum, m, n + 1 - k, k, 0)) 
C#
// C# program to find Max sum of M // non-overlapping subarray of size  // K in an Array using System;  class GFG {          // calculating presum of array.      // presum[i] is going to store      // prefix sum of subarray of      // size k beginning with arr[i]     static void calculatePresumArray(int []presum,                           int []arr, int n, int k)     {          for (int i = 0; i < k; i++)         presum[0] += arr[i];              // store sum of array index i to i+k          // in presum array at index i of it.         for (int i = 1; i <= n - k; i++)          presum[i] += presum[i - 1] + arr[i + k - 1]                                       - arr[i - 1];     }          // calculating maximum sum of     // m non overlapping array     static int maxSumMnonOverlappingSubarray(                      int []presum, int m, int size,                                    int k, int start)     {                  // if m is zero then no need          // any array of any size so         // return 0.         if (m == 0)             return 0;              // if start is greater then the          // size of presum array return 0.         if (start > size - 1)             return 0;              //int mx = 0;              // if including subarray of size k         int includeMax = presum[start] +                  maxSumMnonOverlappingSubarray(presum,                           m - 1, size, k, start + k);              // if excluding element and searching          // in all next possible subarrays         int excludeMax =                  maxSumMnonOverlappingSubarray(presum,                               m, size, k, start + 1);              // return max         return Math.Max(includeMax, excludeMax);     }          // Driver code     public static void Main ()      {         int []arr = { 2, 10, 7, 18, 5, 33, 0 };         int n = arr.Length;         int m = 3, k = 1;         int []presum = new int[n + 1 - k] ;         calculatePresumArray(presum, arr, n, k);                  // resulting presum array         // will have a size = n+1-k         Console.WriteLine(               maxSumMnonOverlappingSubarray(presum,                               m, n + 1 - k, k, 0));     } } 
JavaScript
// Javascript program to find Max sum  // of M non-overlapping subarray // of size K in an Array  // calculating presum of array.  // presum[i] is going to store  // prefix sum of subarray of  // size k beginning with arr[i] function calculatePresumArray(presum,arr,n,k) {     for (let i = 0; i < k; i++)         presum[0] += arr[i];        // store sum of array index i to i+k      // in presum array at index i of it.     for (let i = 1; i <= n - k; i++)          presum[i] += presum[i - 1] + arr[i + k - 1] -                                   arr[i - 1];             }  // calculating maximum sum of // m non overlapping array function maxSumMnonOverlappingSubarray(presum,m,size,k,start) {     // if m is zero then no need      // any array of any size so     // return 0.     if (m == 0)         return 0;        // if start is greater then the      // size of presum array return 0.     if (start > size - 1)         return 0;        let mx = 0;        // if including subarray of size k     let includeMax = presum[start] +              maxSumMnonOverlappingSubarray(presum,                       m - 1, size, k, start + k);        // if excluding element and searching      // in all next possible subarrays     let excludeMax =              maxSumMnonOverlappingSubarray(presum,                           m, size, k, start + 1);        // return max     return Math.max(includeMax, excludeMax); }  // Driver code let arr=[2, 10, 7, 18, 5, 33, 0]; let n = arr.length; let m = 3, k = 1; let presum = new Array(n + 1 - k) ; for(let i = 0; i < presum.length; i++) {     presum[i] = 0; } calculatePresumArray(presum, arr, n, k);  // resulting presum array // will have a size = n+1-k console.log(maxSumMnonOverlappingSubarray(presum,                                                  m, n + 1 - k, k, 0));      

Output
61

Time complexity: O(2^m * n), as recursion explores all possible ways to pick m non-overlapping subarrays, leading to O(2^m) recursive calls and calculating the prefix sum takes O(n) time.
Space complexity: O(n), The prefix sum array requires O(n) space and the recursion stack depth can go up to O(m) in the worst case.

Using Dynamic Programming

The idea is to maximize the sum of M non-overlapping subarrays of size K using dynamic programming with memoization. We have two choices at every index: either take the current subarray (of size K) and move forward or skip it and check the next element. We store results in a memoization table to avoid recomputation. The final result is the maximum sum obtained by selecting M such subarrays optimally.

Steps to implement the above idea:

  • Define a recursive function to determine the maximum sum of M non-overlapping subarrays of size K.
  • Handle base cases: If all M subarrays are selected, return 0. If the index exceeds the valid range, return a minimum possible value.
  • Use memoization to store previously computed results to avoid redundant calculations.
  • Calculate the sum of the current subarray of size K and explore two choices—either take this subarray and move ahead by K steps or skip the current element and move forward by one step.
  • Store the maximum of both choices in the memoization table and return it.
  • Implement a wrapper function to initialize the memoization table and call the recursive function.

Below is the implementation of the above approach:

C++
// Approach: DP with memoization // Language: C++  #include <bits/stdc++.h> using namespace std;  // Recursive function to find the maximum sum of M non-overlapping subarrays int solve(vector<int> &arr, int n, int m, int k, int idx, vector<vector<int>> &memo) {     // Base case: If we have selected M subarrays, return 0     if (m == 0) {         return 0;     }          // If the index is beyond the valid range, return a minimum value     if (idx > n - k) {         return INT_MIN;     }          // If the result is already computed, return it from memo     if (memo[idx][m] != -1) {         return memo[idx][m];     }          // Calculate sum of the current subarray of size K     int sum = accumulate(arr.begin() + idx, arr.begin() + idx + k, 0);          // Option 1: Take the current subarray and move to the next non-overlapping subarray     int take = sum + solve(arr, n, m - 1, k, idx + k, memo);          // Option 2: Skip the current element and check the next index     int skip = solve(arr, n, m, k, idx + 1, memo);          // Store the maximum of both choices in memo and return it     return memo[idx][m] = max(take, skip); }  // Function to initialize memoization table and call the recursive function int maxSumMSubarrays(vector<int> &arr, int n, int m, int k) {     vector<vector<int>> memo(n, vector<int>(m + 1, -1)); // Initialize memo table with -1     return solve(arr, n, m, k, 0, memo); }  int main() {     vector<int> arr = {2, 10, 7, 18, 5, 33, 0}; // Input array     int n = arr.size(), m = 3, k = 1; // Define number of subarrays and their size     cout << maxSumMSubarrays(arr, n, m, k) << endl; // Output the result     return 0; } 
Java
// Approach: DP with memoization // Language: Java  import java.util.*;  class GfG {     // Recursive function to find the maximum sum of M non-overlapping subarrays     static int solve(List<Integer> arr, int n, int m, int k, int idx, int[][] memo) {         // Base case: If we have selected M subarrays, return 0         if (m == 0) {             return 0;         }          // If the index is beyond the valid range, return a minimum value         if (idx > n - k) {             return Integer.MIN_VALUE;         }          // If the result is already computed, return it from memo         if (memo[idx][m] != -1) {             return memo[idx][m];         }          // Calculate sum of the current subarray of size K         int sum = 0;         for (int i = idx; i < idx + k; i++) {             sum += arr.get(i);         }          // Option 1: Take the current subarray and move to the next non-overlapping subarray         int take = sum + solve(arr, n, m - 1, k, idx + k, memo);          // Option 2: Skip the current element and check the next index         int skip = solve(arr, n, m, k, idx + 1, memo);          // Store the maximum of both choices in memo and return it         return memo[idx][m] = Math.max(take, skip);     }      // Function to initialize memoization table and call the recursive function     static int maxSumMSubarrays(List<Integer> arr, int n, int m, int k) {         int[][] memo = new int[n][m + 1]; // Initialize memo table with -1         for (int[] row : memo) {             Arrays.fill(row, -1);         }         return solve(arr, n, m, k, 0, memo);     }      public static void main(String[] args) {         List<Integer> arr = Arrays.asList(2, 10, 7, 18, 5, 33, 0); // Input array         int n = arr.size(), m = 3, k = 1; // Define number of subarrays and their size         System.out.println(maxSumMSubarrays(arr, n, m, k)); // Output the result     } } 
Python
# Approach: DP with memoization # Language: Python  def solve(arr, n, m, k, idx, memo):     # Base case: If we have selected M subarrays, return 0     if m == 0:         return 0          # If the index is beyond the valid range, return a minimum value     if idx > n - k:         return float('-inf')          # If the result is already computed, return it from memo     if memo[idx][m] != -1:         return memo[idx][m]          # Calculate sum of the current subarray of size K     sum_subarray = sum(arr[idx:idx + k])          # Option 1: Take the current subarray and move to the next non-overlapping subarray     take = sum_subarray + solve(arr, n, m - 1, k, idx + k, memo)          # Option 2: Skip the current element and check the next index     skip = solve(arr, n, m, k, idx + 1, memo)          # Store the maximum of both choices in memo and return it     memo[idx][m] = max(take, skip)     return memo[idx][m]  def max_sum_m_subarrays(arr, n, m, k):     memo = [[-1] * (m + 1) for _ in range(n)]  # Initialize memo table with -1     return solve(arr, n, m, k, 0, memo)  if __name__ == "__main__":     arr = [2, 10, 7, 18, 5, 33, 0]  # Input array     n, m, k = len(arr), 3, 1  # Define number of subarrays and their size     print(max_sum_m_subarrays(arr, n, m, k))  # Output the result 
C#
// Approach: DP with memoization // Language: C#  using System; using System.Collections.Generic;  class GfG {     // Recursive function to find the maximum sum of M non-overlapping subarrays     static int Solve(List<int> arr, int n, int m, int k, int idx, int[,] memo) {         // Base case: If we have selected M subarrays, return 0         if (m == 0) {             return 0;         }          // If the index is beyond the valid range, return a minimum value         if (idx > n - k) {             return int.MinValue;         }          // If the result is already computed, return it from memo         if (memo[idx, m] != -1) {             return memo[idx, m];         }          // Calculate sum of the current subarray of size K         int sum = 0;         for (int i = idx; i < idx + k; i++) {             sum += arr[i];         }          // Option 1: Take the current subarray and move to the next non-overlapping subarray         int take = sum + Solve(arr, n, m - 1, k, idx + k, memo);          // Option 2: Skip the current element and check the next index         int skip = Solve(arr, n, m, k, idx + 1, memo);          // Store the maximum of both choices in memo and return it         return memo[idx, m] = Math.Max(take, skip);     }      // Function to initialize memoization table and call the recursive function     static int MaxSumMSubarrays(List<int> arr, int n, int m, int k) {         int[,] memo = new int[n, m + 1]; // Initialize memo table with -1         for (int i = 0; i < n; i++) {             for (int j = 0; j <= m; j++) {                 memo[i, j] = -1;             }         }         return Solve(arr, n, m, k, 0, memo);     }      public static void Main() {         List<int> arr = new List<int> { 2, 10, 7, 18, 5, 33, 0 }; // Input array         int n = arr.Count, m = 3, k = 1; // Define number of subarrays and their size         Console.WriteLine(MaxSumMSubarrays(arr, n, m, k)); // Output the result     } } 
JavaScript
// Approach: DP with memoization // Language: JavaScript  function solve(arr, n, m, k, idx, memo) {     // Base case: If we have selected M subarrays, return 0     if (m === 0) {         return 0;     }          // If the index is beyond the valid range, return a minimum value     if (idx > n - k) {         return Number.MIN_SAFE_INTEGER;     }          // If the result is already computed, return it from memo     if (memo[idx][m] !== -1) {         return memo[idx][m];     }          // Calculate sum of the current subarray of size K     let sumSubarray = arr.slice(idx, idx + k).reduce((a, b) => a + b, 0);          // Option 1: Take the current subarray and move to the next non-overlapping subarray     let take = sumSubarray + solve(arr, n, m - 1, k, idx + k, memo);          // Option 2: Skip the current element and check the next index     let skip = solve(arr, n, m, k, idx + 1, memo);          // Store the maximum of both choices in memo and return it     return memo[idx][m] = Math.max(take, skip); }  function maxSumMSubarrays(arr, n, m, k) {     let memo = Array.from({ length: n }, () => Array(m + 1).fill(-1)); // Initialize memo table with -1     return solve(arr, n, m, k, 0, memo); }  let arr = [2, 10, 7, 18, 5, 33, 0]; // Input array let n = arr.length, m = 3, k = 1; // Define number of subarrays and their size console.log(maxSumMSubarrays(arr, n, m, k)); // Output the result 

Output
61 

Time Complexity: O(N * M) since each state (idx, m) is computed once and stored in memoization.
Space Complexity: O(N * M) due to the memoization table storing results for N indices and M subarrays.



Next Article
Maximum sum two non-overlapping subarrays of given size

K

kddeepak
Improve
Article Tags :
  • Arrays
  • DSA
  • Dynamic Programming
  • sliding-window
Practice Tags :
  • Arrays
  • Dynamic Programming
  • sliding-window

Similar Reads

  • Maximum sum two non-overlapping subarrays of given size
    Given an array, we need to find two subarrays with a specific length K such that sum of these subarrays is maximum among all possible choices of subarrays. Examples: Input : arr[] = [2, 5, 1, 2, 7, 3, 0] K = 2 Output : 2 5 7 3 We can choose two arrays of maximum sum as [2, 5] and [7, 3], the sum of
    12 min read
  • Maximum sum of non-overlapping subarrays of length atmost K
    Given an integer array 'arr' of length N and an integer 'k', select some non-overlapping subarrays such that each sub-array if of length at most 'k', no two sub-arrays are adjacent and sum of all the elements of the selected sub-arrays are maximum.Examples: Input : arr[] = {-1, 2, -3, 4, 5}, k = 2 O
    10 min read
  • Maximum Sum of two non-overlapping Subarrays of any length
    Given an array A consisting of N integers, the task is to find the maximum sum of two non-overlapping subarrays of any length of the array. Note: You can select empty subarrays also. Examples: Input: N = 3, A[] = {-4, -5, -2}Output: 0Explanation: Two empty subarrays are optimal with maximum sum = 0.
    6 min read
  • Maximum sum of at most K non-overlapping Subarray
    Given an array, arr[] of size N, the task is to find the sum of the at most K non-overlapping contiguous subarray within an arr[] with the maximum sum. Examples: Input: arr[] = [4, 1, -3, 7, -5, 6, -2, 1], K = 3Output: 18Explanation: In the above input, the maximum k subarray sum is 18 and the subar
    15 min read
  • Maximize count of non-overlapping subarrays with sum K
    Given an array arr[] and an integer K, the task is to print the maximum number of non-overlapping subarrays with a sum equal to K. Examples: Input: arr[] = {-2, 6, 6, 3, 5, 4, 1, 2, 8}, K = 10Output: 3Explanation: All possible non-overlapping subarrays with sum K(= 10) are {-2, 6, 6}, {5, 4, 1}, {2,
    6 min read
  • Maximum sum subarray of size range [L, R]
    Given an integer array arr[] of size N and two integer L and R. The task is to find the maximum sum subarray of size between L and R (both inclusive). Example: Input: arr[] = {1, 2, 2, 1}, L = 1, R = 3 Output: 5 Explanation: Subarray of size 1 are {1}, {2}, {2}, {1} and maximum sum subarray = 2 for
    8 min read
  • Maximum sum of lengths of non-overlapping subarrays with k as the max element.
    Find the maximum sum of lengths of non-overlapping subarrays (contiguous elements) with k as the maximum element. Examples: Input : arr[] = {2, 1, 4, 9, 2, 3, 8, 3, 4} k = 4 Output : 5 {2, 1, 4} => Length = 3 {3, 4} => Length = 2 So, 3 + 2 = 5 is the answer Input : arr[] = {1, 2, 3, 2, 3, 4, 1
    15+ min read
  • Find maximum (or minimum) sum of a subarray of size k
    Given an array of integers and a number k, find the maximum sum of a subarray of size k. Examples: Input : arr[] = {100, 200, 300, 400}, k = 2Output : 700 Input : arr[] = {1, 4, 2, 10, 23, 3, 1, 0, 20}, k = 4 Output : 39Explanation: We get maximum sum by adding subarray {4, 2, 10, 23} of size 4. Inp
    14 min read
  • Count maximum non-overlapping subarrays with given sum
    Given an array arr[] consisting of N integers and an integer target, the task is to find the maximum number of non-empty non-overlapping subarrays such that the sum of array elements in each subarray is equal to the target. Examples: Input: arr[] = {2, -1, 4, 3, 6, 4, 5, 1}, target = 6Output: 3Expla
    7 min read
  • Count non-overlapping Subarrays of size K with equal alternate elements
    Given an array arr[] of length N, the task is to find the count of non-overlapping subarrays of size K such that the alternate elements are equal. Examples: Input: arr[] = {2, 4, 2, 7}, K = 3Output: 1Explanation: Given subarray {2, 4, 2} is a valid array because the elements in even position(index n
    7 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences