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
  • Practice on BST
  • MCQs on BST
  • BST Tutorial
  • BST Insertion
  • BST Traversals
  • BST Searching
  • BST Deletion
  • Check BST
  • Balance a BST
  • Self-Balancing BST
  • AVL Tree
  • Red-Black Tree
  • Splay Tree
  • BST Application
  • BST Advantage
Open In App
Next Article:
Transform a BST to greater sum tree
Next article icon

Transform a BST to greater sum tree

Last Updated : 05 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report
Try it on GfG Practice
redirect icon

Given a BST, transform it into a greater sum tree where each node contains the sum of all nodes greater than that node.

Example:

Input:

Transform-a-BST-to-greater-sum-tree

Output:

Transform-a-BST-to-greater-sum-tree-2


Explanation:  The above tree represents the greater sum tree where each node contains the sum of all nodes greater than that node in original tree.

  • The root node 11 becomes 119 (sum of 15 + 29 + 35 + 40).
  • The left child of 11 becomes 137 (sum of 7 + 11 + 15 + 29 + 35 + 40).
  • The right child of 11 becomes 75 (sum of 35 + 40) and so on.

Table of Content

  • [Naive Approach] By Calculating Sum for Each Node - O(n^2) Time and O(n) Space
  • [Expected Approach] Using Single Traversal - O(n) Time and O(n) Space

[Naive Approach] By Calculating Sum for Each Node - O(n^2) Time and O(n) Space

This method doesn’t require the tree to be a BST. Following are the steps:

  • Traverse node by node (in-order, pre-order, etc.).
  • For each node, find all the nodes greater than the current node and sum their values. Store all these sums.
  • Replace each node's value with its corresponding sum by traversing in the same order as in Step 1.

Below is the implementation of the above approach:

C++
// C++ program to transform a BST to sum tree  #include <bits/stdc++.h> using namespace std;  class Node { public:     int data;     Node* left;     Node* right;      Node(int value) {         data = value;         left = nullptr;         right = nullptr;     } };  // Function to find nodes having greater value than current node. void findGreaterNodes(Node* root, Node* curr, unordered_map<Node*,int> &map) {     if (root == nullptr) return;          // if value is greater than node, then increment      // it in the map     if (root->data > curr->data)          map[curr] += root->data;              findGreaterNodes(root->left, curr, map);     findGreaterNodes(root->right, curr, map); }  void transformToGreaterSumTree(Node* curr, Node* root,                                 unordered_map<Node*,int>&map) {     if (curr == nullptr) {         return;     }      // Find all nodes greater than current node     findGreaterNodes(root, curr, map);          // Recursively check for left and right subtree.     transformToGreaterSumTree(curr->left, root, map);     transformToGreaterSumTree(curr->right, root, map); }  // Function to update value of each node. void preOrderTrav(Node* root, unordered_map<Node*, int> &map) {     if (root == nullptr) return;          root->data = map[root];          preOrderTrav(root->left, map);     preOrderTrav(root->right, map); }  void transformTree(Node* root) {      	// map to store greater sum for each node.   	unordered_map<Node*, int> map;     transformToGreaterSumTree(root, root, map);          // update the value of nodes     preOrderTrav(root, map); }  void inorder(Node* root) {     if (root == nullptr) {         return;     }     inorder(root->left);     cout << root->data << " ";     inorder(root->right); }  int main() {      // Constructing the BST     //     11     //    /  \     //   2    29     //  / \   / \     // 1   7 15  40     //             \     //              50      Node* root = new Node(11);     root->left = new Node(2);     root->right = new Node(29);     root->left->left = new Node(1);     root->left->right = new Node(7);     root->right->left = new Node(15);     root->right->right = new Node(40);     root->right->right->right = new Node(50);      transformTree(root);     inorder(root);      return 0; } 
Java
// Java program to transform a BST to sum tree import java.util.HashMap;  class Node {     int data;     Node left, right;      Node(int value) {         data = value;         left = null;         right = null;     } }  class GfG {          // Function to find nodes having greater value than    // current node.     static void findGreaterNodes(Node root, Node curr,                                   HashMap<Node, Integer> map) {         if (root == null) return;          // if value is greater than node, then increment         // it in the map         if (root.data > curr.data)             map.put(curr, map.getOrDefault(curr, 0) + root.data);          findGreaterNodes(root.left, curr, map);         findGreaterNodes(root.right, curr, map);     }      static void transformToGreaterSumTree(Node curr, Node root,                                           HashMap<Node, Integer> map) {         if (curr == null) {             return;         }          // Find all nodes greater than current node         findGreaterNodes(root, curr, map);          // Recursively check for left and right subtree.         transformToGreaterSumTree(curr.left, root, map);         transformToGreaterSumTree(curr.right, root, map);     }      // Function to update value of each node.     static void preOrderTrav(Node root, HashMap<Node, Integer> map) {         if (root == null) return;          root.data = map.getOrDefault(root, 0);          preOrderTrav(root.left, map);         preOrderTrav(root.right, map);     }        static void transformTree(Node root) {                  // map to store greater sum for each node.         HashMap<Node, Integer> map = new HashMap<>();         transformToGreaterSumTree(root, root, map);          // update the value of nodes         preOrderTrav(root, map);     }      static void inorder(Node root) {         if (root == null) {             return;         }         inorder(root.left);         System.out.print(root.data + " ");         inorder(root.right);     }      public static void main(String[] args) {                  // Constructing the BST         //     11         //    /  \         //   2    29         //  / \   / \         // 1   7 15  40         //             \         //              50         Node root = new Node(11);         root.left = new Node(2);         root.right = new Node(29);         root.left.left = new Node(1);         root.left.right = new Node(7);         root.right.left = new Node(15);         root.right.right = new Node(40);         root.right.right.right = new Node(50);          transformTree(root);         inorder(root);     } } 
Python
# Python program to transform a BST # to sum tree  class Node:     def __init__(self, value):         self.data = value         self.left = None         self.right = None  # Function to find nodes having greater  # value than current node. def findGreaterNodes(root, curr, map):     if root is None:         return          # if value is greater than node, then increment     # it in the map     if root.data > curr.data:         map[curr] += root.data      findGreaterNodes(root.left, curr, map)     findGreaterNodes(root.right, curr, map)  def transformToGreaterSumTree(curr, root, map):     if curr is None:         return      # Find all nodes greater than current node     map[curr] = 0     findGreaterNodes(root, curr, map)      # Recursively check for left and right subtree.     transformToGreaterSumTree(curr.left, root, map)     transformToGreaterSumTree(curr.right, root, map)  # Function to update value of each node. def preOrderTrav(root, map):     if root is None:         return          root.data = map.get(root, root.data)          preOrderTrav(root.left, map)     preOrderTrav(root.right, map)  def transformTree(root):          # map to store greater sum for each node.     map = {}     transformToGreaterSumTree(root, root, map)          # update the value of nodes     preOrderTrav(root, map)  def inorder(root):     if root is None:         return     inorder(root.left)     print(root.data, end=" ")     inorder(root.right)  if __name__ == "__main__":          # Constructing the BST     #     11     #    /  \     #   2    29     #  / \   / \     # 1   7 15  40     #             \     #              50     root = Node(11)     root.left = Node(2)     root.right = Node(29)     root.left.left = Node(1)     root.left.right = Node(7)     root.right.left = Node(15)     root.right.right = Node(40)     root.right.right.right = Node(50)          transformTree(root)     inorder(root) 
C#
// C# program to transform a BST // to sum tree using System; using System.Collections.Generic;  class Node {     public int data;     public Node left, right;      public Node(int value) {         data = value;         left = null;         right = null;     } }  class GfG {          // Function to find nodes having greater value   	// than current node.     static void FindGreaterNodes(Node root, Node curr,                                   Dictionary<Node, int> map) {         if (root == null) return;          // if value is greater than node, then increment         // it in the map         if (root.data > curr.data)             map[curr] += root.data;          FindGreaterNodes(root.left, curr, map);         FindGreaterNodes(root.right, curr, map);     }      static void TransformToGreaterSumTree(Node curr, Node root,                                            Dictionary<Node, int> map) {         if (curr == null) {             return;         }          // Find all nodes greater than       	// current node         map[curr] = 0;         FindGreaterNodes(root, curr, map);          // Recursively check for left and right subtree.         TransformToGreaterSumTree(curr.left, root, map);         TransformToGreaterSumTree(curr.right, root, map);     }      // Function to update value of each node.     static void PreOrderTrav(Node root, Dictionary<Node, int> map) {         if (root == null) return;          root.data = map.ContainsKey(root) ? map[root] : root.data;          PreOrderTrav(root.left, map);         PreOrderTrav(root.right, map);     }        static void TransformTree(Node root) {                  // map to store greater sum for each node.         Dictionary<Node, int> map = new Dictionary<Node, int>();         TransformToGreaterSumTree(root, root, map);          // update the value of nodes         PreOrderTrav(root, map);     }      static void Inorder(Node root) {         if (root == null) {             return;         }         Inorder(root.left);         Console.Write(root.data + " ");         Inorder(root.right);     }      static void Main(string[] args) {                  // Constructing the BST         //     11         //    /  \         //   2    29         //  / \   / \         // 1   7 15  40         //             \         //              50         Node root = new Node(11);         root.left = new Node(2);         root.right = new Node(29);         root.left.left = new Node(1);         root.left.right = new Node(7);         root.right.left = new Node(15);         root.right.right = new Node(40);         root.right.right.right = new Node(50);          TransformTree(root);         Inorder(root);     } } 
JavaScript
// JavaScript program to transform  // a BST to sum tree class Node {     constructor(value) {         this.data = value;         this.left = null;         this.right = null;     } }  // Function to find nodes having greater value  // than current node. function findGreaterNodes(root, curr, map) {     if (root === null) return;      // if value is greater than node, then increment     // it in the map     if (root.data > curr.data) {         map.set(curr, (map.get(curr) || 0) + root.data);     }      findGreaterNodes(root.left, curr, map);     findGreaterNodes(root.right, curr, map); }  function transformToGreaterSumTree(curr, root, map) {     if (curr === null) {         return;     }      // Find all nodes greater than current node     findGreaterNodes(root, curr, map);      // Recursively check for left and right subtree.     transformToGreaterSumTree(curr.left, root, map);     transformToGreaterSumTree(curr.right, root, map); }  // Function to update value of each node. function preOrderTrav(root, map) {     if (root === null) return;      root.data = map.has(root) ? map.get(root) : 0;      preOrderTrav(root.left, map);     preOrderTrav(root.right, map); }  function transformTree(root) {      // map to store greater sum for each node.     const map = new Map();     transformToGreaterSumTree(root, root, map);      // update the value of nodes     preOrderTrav(root, map); }  function inorder(root) {     if (root === null) {         return;     }     inorder(root.left);     console.log(root.data + " ");     inorder(root.right); }  // Constructing the BST const root = new Node(11); root.left = new Node(2); root.right = new Node(29); root.left.left = new Node(1); root.left.right = new Node(7); root.right.left = new Node(15); root.right.right = new Node(40); root.right.right.right = new Node(50);  transformTree(root); inorder(root); 

Output
154 152 145 134 119 90 50 0  

Time Complexity: O(n^2), where n is the number of nodes in tree.
Auxiliary Space: O(n)

Note: This approach will give time limit exceeded (TLE) error.

[Expected Approach] Using Single Traversal - O(n) Time and O(n) Space

The idea is to traverse the tree in reverse in-order (right -> root -> left) while keeping a running sum of all previously visited nodes. The value of each node is updated to this running sum, which ensure that each node contains the sum of all nodes greater than it.

Below is the implementation of the above approach: 

C++
// C++ program to transform a BST to sum tree  #include <bits/stdc++.h> using namespace std;  class Node { public:     int data;     Node* left;     Node* right;      Node(int value) {         data = value;         left = nullptr;         right = nullptr;     } };  void transformToGreaterSumTree(Node* root, int& sum) {     if (root == nullptr) {         return;     }      // Traverse the right subtree first (larger values)     transformToGreaterSumTree(root->right, sum);      // Update the sum and the current node's value     sum += root->data;     root->data = sum - root->data;      // Traverse the left subtree (smaller values)     transformToGreaterSumTree(root->left, sum); }  void transformTree(Node* root) {      	// Initialize the cumulative sum     int sum = 0;      transformToGreaterSumTree(root, sum); }  void inorder(Node* root) {     if (root == nullptr) {         return;     }     inorder(root->left);     cout << root->data << " ";     inorder(root->right); }  int main() {      // Constructing the BST     //     11     //    /  \     //   2    29     //  / \   / \     // 1   7 15  40     //             \     //              50      Node* root = new Node(11);     root->left = new Node(2);     root->right = new Node(29);     root->left->left = new Node(1);     root->left->right = new Node(7);     root->right->left = new Node(15);     root->right->right = new Node(40);     root->right->right->right = new Node(50);      transformTree(root);     inorder(root);      return 0; } 
C
// C program to transform a BST  // to sum tree  #include <stdio.h> #include <stdlib.h>  struct Node {     int data;     struct Node* left;     struct Node* right; };  void transformToGreaterSumTree(struct Node* root, int* sum) {     if (root == NULL) {         return;     }      // Traverse the right subtree first (larger values)     transformToGreaterSumTree(root->right, sum);      // Update the sum and the current node's value     *sum += root->data;     root->data = *sum - root->data;      // Traverse the left subtree (smaller values)     transformToGreaterSumTree(root->left, sum); }  void transformTree(struct Node* root) {      	// Initialize the cumulative sum     int sum = 0;      transformToGreaterSumTree(root, &sum); }  void inorder(struct Node* root) {     if (root == NULL) {         return;     }     inorder(root->left);     printf("%d ", root->data);     inorder(root->right); }  struct Node* createNode(int data) {     struct Node* node =        (struct Node*)malloc(sizeof(struct Node));     node->data = data;     node->left = NULL;     node->right = NULL;     return node; }  int main() {        // Constructing the BST     //     11     //    /  \     //   2    29     //  / \   / \     // 1   7 15  40     //             \     //              50      struct Node* root = createNode(11);     root->left = createNode(2);     root->right = createNode(29);     root->left->left = createNode(1);     root->left->right = createNode(7);     root->right->left = createNode(15);     root->right->right = createNode(40);     root->right->right->right = createNode(50);      transformTree(root);     inorder(root);     return 0; } 
Java
// Java program to transform a  // BST to sum tree  class Node {     int data;     Node left, right;      Node(int value) {         data = value;         left = right = null;     } }  class GfG {      static void transformToGreaterSumTree(Node root, int[] sum) {         if (root == null) {             return;         }          // Traverse the right subtree first (larger values)         transformToGreaterSumTree(root.right, sum);          // Update the sum and the current node's value         sum[0] += root.data;         root.data = sum[0] - root.data;          // Traverse the left subtree (smaller values)         transformToGreaterSumTree(root.left, sum);     }      static void transformTree(Node root) {              	// Initialize the cumulative sum         int[] sum = {0};          transformToGreaterSumTree(root, sum);     }      static void inorder(Node root) {         if (root == null) {             return;         }         inorder(root.left);         System.out.print(root.data + " ");         inorder(root.right);     }      public static void main(String[] args) {                // Constructing the BST         //     11         //    /  \         //   2    29         //  / \   / \         // 1   7 15  40         //             \         //              50          Node root = new Node(11);         root.left = new Node(2);         root.right = new Node(29);         root.left.left = new Node(1);         root.left.right = new Node(7);         root.right.left = new Node(15);         root.right.right = new Node(40);         root.right.right.right = new Node(50);          transformTree(root);         inorder(root);     } } 
Python
# Python program to transform a BST to sum tree  class Node:     def __init__(self, value):         self.data = value         self.left = None         self.right = None  def transformToGreaterSumTree(root, sum):     if root is None:         return      # Traverse the right subtree first (larger values)     transformToGreaterSumTree(root.right, sum)      # Update the sum and the current node's value     sum[0] += root.data     root.data = sum[0] - root.data      # Traverse the left subtree (smaller values)     transformToGreaterSumTree(root.left, sum)  def transformTree(root):      	# Initialize the cumulative sum     sum = [0]       transformToGreaterSumTree(root, sum)  def inorder(root):     if root is None:         return     inorder(root.left)     print(root.data, end=" ")     inorder(root.right)  if __name__ == "__main__":        # Constructing the BST     #     11     #    /  \     #   2    29     #  / \   / \     # 1   7 15  40     #             \     #              50      root = Node(11)     root.left = Node(2)     root.right = Node(29)     root.left.left = Node(1)     root.left.right = Node(7)     root.right.left = Node(15)     root.right.right = Node(40)     root.right.right.right = Node(50)      transformTree(root)     inorder(root) 
C#
// C# program to transform a BST to sum tree  using System;  class Node {     public int data;     public Node left, right;      public Node(int value) {         data = value;         left = right = null;     } }  class GfG {        static void transformToGreaterSumTree(Node root, ref int sum) {         if (root == null) {             return;         }          // Traverse the right subtree first (larger values)         transformToGreaterSumTree(root.right, ref sum);          // Update the sum and the current node's value         sum += root.data;         root.data = sum - root.data;          // Traverse the left subtree (smaller values)         transformToGreaterSumTree(root.left, ref sum);     }      static void transformTree(Node root) {              	// Initialize the cumulative sum         int sum = 0;          transformToGreaterSumTree(root, ref sum);     }      static void inorder(Node root) {         if (root == null) {             return;         }         inorder(root.left);         Console.Write(root.data + " ");         inorder(root.right);     }      static void Main() {                // Constructing the BST         //     11         //    /  \         //   2    29         //  / \   / \         // 1   7 15  40         //             \         //              50          Node root = new Node(11);         root.left = new Node(2);         root.right = new Node(29);         root.left.left = new Node(1);         root.left.right = new Node(7);         root.right.left = new Node(15);         root.right.right = new Node(40);         root.right.right.right = new Node(50);          transformTree(root);         inorder(root);     } } 
JavaScript
// JavaScript program to transform a // BST to sum tree  class Node {     constructor(value) {         this.data = value;         this.left = null;         this.right = null;     } }  function transformToGreaterSumTree(root, sum) {     if (root === null) {         return;     }      // Traverse the right subtree first (larger values)     transformToGreaterSumTree(root.right, sum);      // Update the sum and the current node's value     sum[0] += root.data;     root.data = sum[0] - root.data;      // Traverse the left subtree (smaller values)     transformToGreaterSumTree(root.left, sum); }  function transformTree(root) {     let sum = [0]; // Initialize the cumulative sum     transformToGreaterSumTree(root, sum); }  // Function to perform in-order traversal (for testing) function inorder(root) {     if (root === null) {         return;     }     inorder(root.left);     console.log(root.data + " ");     inorder(root.right); }  // Constructing the BST //     11 //    /  \ //   2    29 //  / \   / \ // 1   7 15  40 //             \ //              50  let root = new Node(11); root.left = new Node(2); root.right = new Node(29); root.left.left = new Node(1); root.left.right = new Node(7); root.right.left = new Node(15); root.right.right = new Node(40); root.right.right.right = new Node(50);  transformTree(root); inorder(root); 

Output
154 152 145 134 119 90 50 0  

Time Complexity: O(n), where n is the number of nodes in given Binary Tree, as it does a simple traversal of the tree.
Auxiliary Space: O(n)


Next Article
Transform a BST to greater sum tree

K

kartik
Improve
Article Tags :
  • DSA
  • Binary Search Tree
Practice Tags :
  • Binary Search Tree

Similar Reads

    Binary Search Tree
    A Binary Search Tree (BST) is a type of binary tree data structure in which each node contains a unique key and satisfies a specific ordering property:All nodes in the left subtree of a node contain values strictly less than the node’s value. All nodes in the right subtree of a node contain values s
    4 min read
    Introduction to Binary Search Tree
    Binary Search Tree is a data structure used in computer science for organizing and storing data in a sorted manner. Binary search tree follows all properties of binary tree and for every nodes, its left subtree contains values less than the node and the right subtree contains values greater than the
    3 min read
    Applications of BST
    Binary Search Tree (BST) is a data structure that is commonly used to implement efficient searching, insertion, and deletion operations along with maintaining sorted sequence of data. Please remember the following properties of BSTs before moving forward.The left subtree of a node contains only node
    3 min read
    Applications, Advantages and Disadvantages of Binary Search Tree
    A Binary Search Tree (BST) is a data structure used to storing data in a sorted manner. Each node in a Binary Search Tree has at most two children, a left child and a right child, with the left child containing values less than the parent node and the right child containing values greater than the p
    2 min read
    Insertion in Binary Search Tree (BST)
    Given a BST, the task is to insert a new node in this BST.Example: How to Insert a value in a Binary Search Tree:A new key is always inserted at the leaf by maintaining the property of the binary search tree. We start searching for a key from the root until we hit a leaf node. Once a leaf node is fo
    15 min read
    Searching in Binary Search Tree (BST)
    Given a BST, the task is to search a node in this BST. For searching a value in BST, consider it as a sorted array. Now we can easily perform search operation in BST using Binary Search Algorithm. Input: Root of the below BST Output: TrueExplanation: 8 is present in the BST as right child of rootInp
    7 min read
    Deletion in Binary Search Tree (BST)
    Given a BST, the task is to delete a node in this BST, which can be broken down into 3 scenarios:Case 1. Delete a Leaf Node in BST Case 2. Delete a Node with Single Child in BSTDeleting a single child node is also simple in BST. Copy the child to the node and delete the node. Case 3. Delete a Node w
    10 min read
    Binary Search Tree (BST) Traversals – Inorder, Preorder, Post Order
    Given a Binary Search Tree, The task is to print the elements in inorder, preorder, and postorder traversal of the Binary Search Tree. Input: A Binary Search TreeOutput: Inorder Traversal: 10 20 30 100 150 200 300Preorder Traversal: 100 20 10 30 200 150 300Postorder Traversal: 10 30 20 150 300 200 1
    10 min read
    Balance a Binary Search Tree
    Given a BST (Binary Search Tree) that may be unbalanced, the task is to convert it into a balanced BST that has the minimum possible height.Examples: Input: Output: Explanation: The above unbalanced BST is converted to balanced with the minimum possible height.Input: Output: Explanation: The above u
    10 min read
    Self-Balancing Binary Search Trees
    Self-Balancing Binary Search Trees are height-balanced binary search trees that automatically keep the height as small as possible when insertion and deletion operations are performed on the tree. The height is typically maintained in order of logN so that all operations take O(logN) time on average
    4 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