Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • 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
  • DSA
  • Interview Problems on Heap
  • Practice Heap
  • MCQs on Heap
  • Heap Tutorial
  • Binary Heap
  • Building Heap
  • Binomial Heap
  • Fibonacci Heap
  • Heap Sort
  • Heap vs Tree
  • Leftist Heap
  • K-ary Heap
  • Advantages & Disadvantages
Open In App
Next Article:
K maximum sum combinations from two arrays
Next article icon

K maximum sum combinations from two arrays

Last Updated : 28 Feb, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report
Try it on GfG Practice
redirect icon

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 of array B. The task is to return the maximum K valid sum combinations from all the possible sum combinations.

Note: Output array must be sorted in non-increasing order.

Examples:

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)

Input: N = 4, K = 3, A [ ] = {1, 4, 2, 3}, B [ ] = {2, 5, 1, 6}
Output: {10, 9, 9}
Explanation: 10 -> (A : 4) + (B : 6)
9 -> (A : 4) + (B : 5)
9 -> (A : 3) + (B : 6)


[Naive Approach] Generate All Combinations - O(N^2 * log(N^2)) Time and O(N^2) Space

The idea is to generate all possible sum combinations of elements from arrays A and B, storing them in a list. Since each element from A can pair with every element from B, we use a nested loop to compute all sums. We then sort this list in descending order to prioritize larger sums. Finally, we extract the top K values from the sorted list, ensuring we get the K highest sum combinations efficiently.

C++
// C++ program to find N maximum combinations // from two arrays by generating all combinations #include <bits/stdc++.h> using namespace std;  vector<int> maxCombinations(int N, int K,                    vector<int> &A, vector<int> &B) {     vector<int> sums;      // Compute all possible sum combinations     for (int i = 0; i < N; i++) {         for (int j = 0; j < N; j++) {             sums.push_back(A[i] + B[j]);         }     }      // Sort in non-increasing order     sort(sums.begin(), sums.end(), greater<int>());      vector<int> topK;      // Select the top K sums     for (int i = 0; i < K; i++) {         topK.push_back(sums[i]);     }      return topK; }  void printArr(vector<int> &arr) {     for (int num : arr) {         cout << num << " ";     }     cout << endl; }  // Driver code int main() {     int N = 2, K = 2;     vector<int> A = {3, 2}, B = {1, 4};      vector<int> result = maxCombinations(N, K, A, B);          printArr(result);      return 0; } 
Java
// Java program to find N maximum combinations // from two arrays by generating all combinations import java.util.*;  class GfG {          static List<Integer> maxCombinations(int N, int K,                                int A[], int B[]) {         List<Integer> sums = new ArrayList<>();          // Compute all possible sum combinations         for (int i = 0; i < N; i++) {             for (int j = 0; j < N; j++) {                 sums.add(A[i] + B[j]);             }         }          // Sort in non-increasing order         sums.sort(Collections.reverseOrder());          List<Integer> topK = new ArrayList<>();          // Select the top K sums         for (int i = 0; i < K; i++) {             topK.add(sums.get(i));         }          return topK;     }      static void printArr(List<Integer> arr) {         for (int num : arr) {             System.out.print(num + " ");         }         System.out.println();     }      // Driver code     public static void main(String[] args) {         int N = 2, K = 2;         int A[] = {3, 2}, B[] = {1, 4};          List<Integer> result = maxCombinations(N, K, A, B);                  printArr(result);     } } 
Python
# Python program to find N maximum combinations # from two arrays by generating all combinations  def maxCombinations(N, K, A, B):     sums = []      # Compute all possible sum combinations     for i in range(N):         for j in range(N):             sums.append(A[i] + B[j])      # Sort in non-increasing order     sums.sort(reverse=True)      topK = []      # Select the top K sums     for i in range(K):         topK.append(sums[i])      return topK  def printArr(arr):     for num in arr:         print(num, end=" ")     print()  # Driver code if __name__ == "__main__":     N, K = 2, 2     A = [3, 2]     B = [1, 4]      result = maxCombinations(N, K, A, B)          printArr(result) 
C#
// C# program to find N maximum combinations // from two arrays by generating all combinations using System; using System.Collections.Generic;  class GfG {          static List<int> MaxCombinations(int N, int K,                             int[] A, int[] B) {         List<int> sums = new List<int>();          // Compute all possible sum combinations         for (int i = 0; i < N; i++) {             for (int j = 0; j < N; j++) {                 sums.Add(A[i] + B[j]);             }         }          // Sort in non-increasing order         sums.Sort((a, b) => b.CompareTo(a));          List<int> topK = new List<int>();          // Select the top K sums         for (int i = 0; i < K; i++) {             topK.Add(sums[i]);         }          return topK;     }      static void PrintArr(List<int> arr) {         foreach (int num in arr) {             Console.Write(num + " ");         }         Console.WriteLine();     }      // Driver code     static void Main() {         int N = 2, K = 2;         int[] A = {3, 2}, B = {1, 4};          List<int> result = MaxCombinations(N, K, A, B);                  PrintArr(result);     } } 
JavaScript
// JavaScript program to find N maximum combinations // from two arrays by generating all combinations  function maxCombinations(N, K, A, B) {     let sums = [];      // Compute all possible sum combinations     for (let i = 0; i < N; i++) {         for (let j = 0; j < N; j++) {             sums.push(A[i] + B[j]);         }     }      // Sort in non-increasing order     sums.sort((a, b) => b - a);      let topK = [];      // Select the top K sums     for (let i = 0; i < K; i++) {         topK.push(sums[i]);     }      return topK; }  function printArr(arr) {     console.log(arr.join(" ")); }  // Driver code let N = 2, K = 2; let A = [3, 2], B = [1, 4];  let result = maxCombinations(N, K, A, B);  printArr(result); 

Output
7 6  

[Expected Approach] Using Sorting + Heap + Set - O(N * logN) Time and O(N) Space

The idea is to use a max heap (priority queue). First, we sort both arrays in descending order so that the largest possible sums appear first. We then use a max heap to track the highest sum combinations, starting with the largest sum from A[0] + B[0]. At each step, we extract the maximum sum and push the next possible sums by incrementing the indices, ensuring that we always get the next largest sum efficiently. A set is used to track visited pairs, preventing duplicate computations.

Steps to implement the above idea:

  • Sort both arrays in descending order to prioritize larger sums.
  • Initialize a max heap and insert the largest sum combination along with its indices.
  • Use a set to track visited index pairs and avoid duplicates.
  • Extract the largest sum from the heap, store it in the result, and push new valid combinations.
  • Push the next possible sums by incrementing either index and check if they are already used.
  • Repeat for K iterations to get the K largest sum combinations.
C++
// C++ program to find N maximum combinations // using a max heap for an O(N log N) approach #include <bits/stdc++.h> using namespace std;  vector<int> maxCombinations(int N, int K,                vector<int> &A, vector<int> &B) {                        // Sort both arrays in descending order     sort(A.rbegin(), A.rend());     sort(B.rbegin(), B.rend());      // Max heap to store {sum, {i, j}}     priority_queue<pair<int, pair<int, int>>> maxHeap;     set<pair<int, int>> used;      // Push the largest sum combination     maxHeap.push({A[0] + B[0], {0, 0}});     used.insert({0, 0});      vector<int> topK;      // Extract K maximum sum combinations     for (int count = 0; count < K; count++) {         // Extract top element         pair<int, pair<int, int>> top = maxHeap.top();         maxHeap.pop();          int sum = top.first;         int i = top.second.first, j = top.second.second;          topK.push_back(sum);          // Push next combination (i+1, j) if within bounds and not used         if (i + 1 < N && used.find({i + 1, j}) == used.end()) {             maxHeap.push({A[i + 1] + B[j], {i + 1, j}});             used.insert({i + 1, j});         }          // Push next combination (i, j+1) if within bounds and not used         if (j + 1 < N && used.find({i, j + 1}) == used.end()) {             maxHeap.push({A[i] + B[j + 1], {i, j + 1}});             used.insert({i, j + 1});         }     }      return topK; }  void printArr(vector<int> &arr) {     for (int num : arr) {         cout << num << " ";     }     cout << endl; }  // Driver code int main() {     int N = 2, K = 2;     vector<int> A = {3, 2}, B = {1, 4};      vector<int> result = maxCombinations(N, K, A, B);          printArr(result);      return 0; } 
Java
// Java program to find N maximum combinations // using a max heap for an O(N log N) approach import java.util.*;  class GfG {     static List<Integer> maxCombinations(int N, int K,                                    int A[], int B[]) {                                                 // Sort both arrays in descending order         Arrays.sort(A);         Arrays.sort(B);         reverse(A);         reverse(B);          // Max heap to store {sum, {i, j}}         PriorityQueue<int[]> maxHeap = new PriorityQueue<>(             (a, b) -> Integer.compare(b[0], a[0])         );         Set<String> used = new HashSet<>();          // Push the largest sum combination         maxHeap.offer(new int[]{A[0] + B[0], 0, 0});         used.add("0,0");          List<Integer> topK = new ArrayList<>();          // Extract K maximum sum combinations         for (int count = 0; count < K; count++) {             // Extract top element             int[] top = maxHeap.poll();             int sum = top[0];             int i = top[1], j = top[2];              topK.add(sum);              // Push next combination (i+1, j) if within bounds and not used             if (i + 1 < N && !used.contains((i + 1) + "," + j)) {                 maxHeap.offer(new int[]{A[i + 1] + B[j], i + 1, j});                 used.add((i + 1) + "," + j);             }              // Push next combination (i, j+1) if within bounds and not used             if (j + 1 < N && !used.contains(i + "," + (j + 1))) {                 maxHeap.offer(new int[]{A[i] + B[j + 1], i, j + 1});                 used.add(i + "," + (j + 1));             }         }          return topK;     }      static void reverse(int[] arr) {         int l = 0, r = arr.length - 1;         while (l < r) {             int temp = arr[l];             arr[l] = arr[r];             arr[r] = temp;             l++;             r--;         }     }      static void printArr(List<Integer> arr) {         for (int num : arr) {             System.out.print(num + " ");         }         System.out.println();     }      // Driver code     public static void main(String[] args) {         int N = 2, K = 2;         int A[] = {3, 2}, B[] = {1, 4};          List<Integer> result = maxCombinations(N, K, A, B);          printArr(result);     } } 
Python
# Python program to find N maximum combinations # using a max heap for an O(N log N) approach import heapq  def maxCombinations(N, K, A, B):          # Sort both arrays in descending order     A.sort(reverse=True)     B.sort(reverse=True)      # Max heap to store (-sum, i, j) since heapq is a min heap     maxHeap = []     used = set()      # Push the largest sum combination     heapq.heappush(maxHeap, (-(A[0] + B[0]), 0, 0))     used.add((0, 0))      topK = []      # Extract K maximum sum combinations     for _ in range(K):         # Extract top element         sum_neg, i, j = heapq.heappop(maxHeap)         sum = -sum_neg  # Convert back to positive          topK.append(sum)          # Push next combination (i+1, j) if within bounds and not used         if i + 1 < N and (i + 1, j) not in used:             heapq.heappush(maxHeap, (-(A[i + 1] + B[j]), i + 1, j))             used.add((i + 1, j))          # Push next combination (i, j+1) if within bounds and not used         if j + 1 < N and (i, j + 1) not in used:             heapq.heappush(maxHeap, (-(A[i] + B[j + 1]), i, j + 1))             used.add((i, j + 1))      return topK  def printArr(arr):     print(" ".join(map(str, arr)))  # Driver code if __name__ == "__main__":     N, K = 2, 2     A = [3, 2]     B = [1, 4]      result = maxCombinations(N, K, A, B)      printArr(result) 
C#
// C# program to find N maximum combinations // using a max heap for an O(N log N) approach using System; using System.Collections.Generic;  class GfG {     static List<int> MaxCombinations(int N, int K, int[] A, int[] B) {         // Sort both arrays in descending order         Array.Sort(A);         Array.Sort(B);         Array.Reverse(A);         Array.Reverse(B);          // Max heap using SortedSet         SortedSet<(int, int, int)> maxHeap =              new SortedSet<(int, int, int)>(Comparer<(int, int, int)>             .Create((a, b) => a.Item1 != b.Item1 ?                  b.Item1.CompareTo(a.Item1) :                  a.Item2 != b.Item2 ? a.Item2.CompareTo(b.Item2) :                  a.Item3.CompareTo(b.Item3)));          HashSet<string> used = new HashSet<string>();          // Push the largest sum combination         maxHeap.Add((A[0] + B[0], 0, 0));         used.Add("0,0");          List<int> topK = new List<int>();          // Extract K maximum sum combinations         for (int count = 0; count < K; count++) {             // Extract top element             var top = maxHeap.Min;             maxHeap.Remove(top);              int sum = top.Item1;             int i = top.Item2, j = top.Item3;              topK.Add(sum);              // Push next combination (i+1, j) if within bounds and not used             if (i + 1 < N && !used.Contains((i + 1) + "," + j)) {                 maxHeap.Add((A[i + 1] + B[j], i + 1, j));                 used.Add((i + 1) + "," + j);             }              // Push next combination (i, j+1) if within bounds and not used             if (j + 1 < N && !used.Contains(i + "," + (j + 1))) {                 maxHeap.Add((A[i] + B[j + 1], i, j + 1));                 used.Add(i + "," + (j + 1));             }         }          return topK;     }      static void PrintArr(List<int> arr) {         foreach (int num in arr) {             Console.Write(num + " ");         }         Console.WriteLine();     }      // Driver code     static void Main() {         int N = 2, K = 2;         int[] A = {3, 2}, B = {1, 4};          List<int> result = MaxCombinations(N, K, A, B);          PrintArr(result);     } } 
JavaScript
// JavaScript program to find N maximum combinations // using a max heap for an O(N log N) approach  class MaxHeap {     constructor() {         this.heap = [];     }      push(element) {         this.heap.push(element);                  // Sort in descending order         this.heap.sort((a, b) => b[0] - a[0]);      }      pop() {         return this.heap.shift();     }      top() {         return this.heap[0];     }      size() {         return this.heap.length;     } }  function maxCombinations(N, K, A, B) {     // Sort both arrays in descending order     A.sort((a, b) => b - a);     B.sort((a, b) => b - a);      // Max heap to store [sum, i, j]     let maxHeap = new MaxHeap();     let used = new Set();      // Push the largest sum combination     maxHeap.push([A[0] + B[0], 0, 0]);     used.add(`0,0`);      let topK = [];      // Extract K maximum sum combinations     for (let count = 0; count < K; count++) {         // Extract top element         let [sum, i, j] = maxHeap.pop();          topK.push(sum);          // Push next combination (i+1, j) if within bounds and not used         if (i + 1 < N && !used.has(`${i + 1},${j}`)) {             maxHeap.push([A[i + 1] + B[j], i + 1, j]);             used.add(`${i + 1},${j}`);         }          // Push next combination (i, j+1) if within bounds and not used         if (j + 1 < N && !used.has(`${i},${j + 1}`)) {             maxHeap.push([A[i] + B[j + 1], i, j + 1]);             used.add(`${i},${j + 1}`);         }     }      return topK; }  function printArr(arr) {     console.log(arr.join(" ")); }  // Driver code let N = 2, K = 2; let A = [3, 2], B = [1, 4];  let result = maxCombinations(N, K, A, B);  printArr(result); 

Output
7 6  



Next Article
K maximum sum combinations from two arrays

F

foreverrookie
Improve
Article Tags :
  • Misc
  • Algorithms
  • Heap
  • DSA
  • Arrays
  • Order-Statistics
Practice Tags :
  • Algorithms
  • Arrays
  • Heap
  • Misc

Similar Reads

    Heap Data Structure
    A Heap is a complete binary tree data structure that satisfies the heap property: for every node, the value of its children is greater than or equal to its own value. Heaps are usually used to implement priority queues, where the smallest (or largest) element is always at the root of the tree.Basics
    2 min read
    Introduction to Heap - Data Structure and Algorithm Tutorials
    A Heap is a special tree-based data structure with the following properties:It is a complete binary tree (all levels are fully filled except possibly the last, which is filled from left to right).It satisfies either the max-heap property (every parent node is greater than or equal to its children) o
    15+ min read
    Binary Heap
    A Binary Heap is a complete binary tree that stores data efficiently, allowing quick access to the maximum or minimum element, depending on the type of heap. It can either be a Min Heap or a Max Heap. In a Min Heap, the key at the root must be the smallest among all the keys in the heap, and this pr
    13 min read
    Advantages and Disadvantages of Heap
    Advantages of Heap Data StructureTime Efficient: Heaps have an average time complexity of O(log n) for inserting and deleting elements, making them efficient for large datasets. We can convert any array to a heap in O(n) time. The most important thing is, we can get the min or max in O(1) timeSpace
    2 min read
    Time Complexity of building a heap
    Consider the following algorithm for building a Heap of an input array A. A quick look over the above implementation suggests that the running time is O(n * lg(n)) since each call to Heapify costs O(lg(n)) and Build-Heap makes O(n) such calls. This upper bound, though correct, is not asymptotically
    2 min read
    Applications of Heap Data Structure
    Heap Data Structure is generally taught with Heapsort. Heapsort algorithm has limited uses because Quicksort is better in practice. Nevertheless, the Heap data structure itself is enormously used. Priority Queues: Heaps are commonly used to implement priority queues, where elements with higher prior
    2 min read
    Comparison between Heap and Tree
    What is Heap? A Heap is a special Tree-based data structure in which the tree is a complete binary tree. Types of Heap Data Structure: Generally, Heaps can be of two types: Max-Heap: In a Max-Heap the key present at the root node must be greatest among the keys present at all of its children. The sa
    3 min read
    When building a Heap, is the structure of Heap unique?
    What is Heap? A heap is a tree based data structure where the tree is a complete binary tree that maintains the property that either the children of a node are less than itself (max heap) or the children are greater than the node (min heap). Properties of Heap: Structural Property: This property sta
    4 min read

    Some other type of Heap

    Binomial Heap
    The main application of Binary Heap is to implement a priority queue. Binomial Heap is an extension of Binary Heap that provides faster union or merge operation with other operations provided by Binary Heap. A Binomial Heap is a collection of Binomial Trees What is a Binomial Tree? A Binomial Tree o
    15 min read
    Fibonacci Heap | Set 1 (Introduction)
    INTRODUCTION:A Fibonacci heap is a data structure used for implementing priority queues. It is a type of heap data structure, but with several improvements over the traditional binary heap and binomial heap data structures.The key advantage of a Fibonacci heap over other heap data structures is its
    5 min read
    Leftist Tree / Leftist Heap
    INTRODUCTION:A leftist tree, also known as a leftist heap, is a type of binary heap data structure used for implementing priority queues. Like other heap data structures, it is a complete binary tree, meaning that all levels are fully filled except possibly the last level, which is filled from left
    15+ min read
    K-ary Heap
    Prerequisite - Binary Heap K-ary heaps are a generalization of binary heap(K=2) in which each node have K children instead of 2. Just like binary heap, it follows two properties: Nearly complete binary tree, with all levels having maximum number of nodes except the last, which is filled in left to r
    15 min read

    Easy problems on Heap

    Check if a given Binary Tree is a Heap
    Given a binary tree, check if it has heap property or not, Binary tree needs to fulfil the following two conditions for being a heap: It should be a complete tree (i.e. Every level of the tree, except possibly the last, is completely filled, and all nodes are as far left as possible.).Every node’s v
    15+ min read
    How to check if a given array represents a Binary Heap?
    Given an array, how to check if the given array represents a Binary Max-Heap.Examples: Input: arr[] = {90, 15, 10, 7, 12, 2} Output: True The given array represents below tree 90 / \ 15 10 / \ / 7 12 2 The tree follows max-heap property as every node is greater than all of its descendants. Input: ar
    11 min read
    Iterative HeapSort
    HeapSort is a comparison-based sorting technique where we first build Max Heap and then swap the root element with the last element (size times) and maintains the heap property each time to finally make it sorted. Examples: Input : 10 20 15 17 9 21 Output : 9 10 15 17 20 21 Input: 12 11 13 5 6 7 15
    11 min read
    Find k largest elements in an array
    Given an array arr[] and an integer k, the task is to find k largest elements in the given array. Elements in the output array should be in decreasing order.Examples:Input: [1, 23, 12, 9, 30, 2, 50], k = 3Output: [50, 30, 23]Input: [11, 5, 12, 9, 44, 17, 2], k = 2Output: [44, 17]Table of Content[Nai
    15+ min read
    K’th Smallest Element in Unsorted Array
    Given an array arr[] of N distinct elements and a number K, where K is smaller than the size of the array. Find the K'th smallest element in the given array. Examples:Input: arr[] = {7, 10, 4, 3, 20, 15}, K = 3 Output: 7Input: arr[] = {7, 10, 4, 3, 20, 15}, K = 4 Output: 10 Table of Content[Naive Ap
    15 min read
    Height of a complete binary tree (or Heap) with N nodes
    Consider a Binary Heap of size N. We need to find the height of it. Examples: Input : N = 6 Output : 2 () / \ () () / \ / () () () Input : N = 9 Output : 3 () / \ () () / \ / \ () () () () / \ () ()Recommended PracticeHeight of HeapTry It! Let the size of the heap be N and the height be h. If we tak
    3 min read
    Heap Sort for decreasing order using min heap
    Given an array of elements, sort the array in decreasing order using min heap. Examples: Input : arr[] = {5, 3, 10, 1}Output : arr[] = {10, 5, 3, 1}Input : arr[] = {1, 50, 100, 25}Output : arr[] = {100, 50, 25, 1}Prerequisite: Heap sort using min heap.Using Min Heap Implementation - O(n Log n) Time
    11 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