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 Tree
  • Practice Tree
  • MCQs on Tree
  • Tutorial on Tree
  • Types of Trees
  • Basic operations
  • Tree Traversal
  • Binary Tree
  • Complete Binary Tree
  • Ternary Tree
  • Binary Search Tree
  • Red-Black Tree
  • AVL Tree
  • Full Binary Tree
  • B-Tree
  • Advantages & Disadvantages
Open In App
Next Article:
Vertical Sum in a given Binary Tree
Next article icon

Vertical width of Binary tree | Set 1

Last Updated : 11 Mar, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report
Try it on GfG Practice
redirect icon

Given a Binary tree, the task is to find the vertical width of the Binary tree. The width of a binary tree is the number of vertical paths in the Binary tree.
 
Examples: 

Input:

Output: 6
Explanation: In this image, the tree contains 6 vertical lines which are the required width of the tree.

Input : 

             7

           /  \

          6    5

         / \  / \

        4   3 2  1 

Output : 5

Input:

           1

         /    \

        2       3

       / \     / \

      4   5   6   7

               \   \ 

                8   9 

Output :  6

Approach:

Take inorder traversal and then take a temp variable to keep the track of unique vertical paths. when moving to left of the node then temp decreases by one and if goes to right then temp value increases by one. If the minimum is greater than temp, then update minimum = temp and if maximum less than temp then update maximum = temp. The vertical width of the tree will be equal to abs(minimum ) + maximum.

Follow the below steps to Implement the idea:

  • Initialize a minimum and maximum variable to track the left-most and right-most index.
  • Run Depth-first search traversal and maintain the current horizontal index curr, for root curr = 0.
    • Traverse left subtree with curr = curr-1
    • Update maximum with curr if curr > maximum.
    • Update minimum with curr if curr < minimum.
    • Traverse right subtree with curr = curr + 1.
  • Print the vertical width of the tree i.e. abs(minimum ) + maximum.

Below is the Implementation of the above approach:

C++




// CPP program to print vertical width
// of a tree
#include <bits/stdc++.h>
using namespace std;
 
// A Binary Tree Node
struct Node {
    int data;
    struct Node *left, *right;
};
 
// get vertical width
void lengthUtil(Node* root, int& maximum, int& minimum,
                int curr = 0)
{
    if (root == NULL)
        return;
 
    // traverse left
    lengthUtil(root->left, maximum, minimum, curr - 1);
 
    // if curr is decrease then get
    // value in minimum
    if (minimum > curr)
        minimum = curr;
 
    // if curr is increase then get
    // value in maximum
    if (maximum < curr)
        maximum = curr;
 
    // traverse right
    lengthUtil(root->right, maximum, minimum, curr + 1);
}
 
int getLength(Node* root)
{
    int maximum = 0, minimum = 0;
    lengthUtil(root, maximum, minimum, 0);
 
    // 1 is added to include root in the width
    return (abs(minimum) + maximum) + 1;
}
 
// Utility function to create a new tree node
Node* newNode(int data)
{
    Node* curr = new Node;
    curr->data = data;
    curr->left = curr->right = NULL;
    return curr;
}
 
// Driver program to test above functions
int main()
{
 
    Node* root = newNode(7);
    root->left = newNode(6);
    root->right = newNode(5);
    root->left->left = newNode(4);
    root->left->right = newNode(3);
    root->right->left = newNode(2);
    root->right->right = newNode(1);
 
    cout << getLength(root) << "\n";
 
    return 0;
}
 
 

Java




// Java program to print vertical width
// of a tree
import java.util.*;
 
class GFG {
 
    // A Binary Tree Node
    static class Node {
        int data;
        Node left, right;
    };
    static int maximum = 0, minimum = 0;
 
    // get vertical width
    static void lengthUtil(Node root, int curr)
    {
        if (root == null)
            return;
 
        // traverse left
        lengthUtil(root.left, curr - 1);
 
        // if curr is decrease then get
        // value in minimum
        if (minimum > curr)
            minimum = curr;
 
        // if curr is increase then get
        // value in maximum
        if (maximum < curr)
            maximum = curr;
 
        // traverse right
        lengthUtil(root.right, curr + 1);
    }
 
    static int getLength(Node root)
    {
        maximum = 0;
        minimum = 0;
        lengthUtil(root, 0);
 
        // 1 is added to include root in the width
        return (Math.abs(minimum) + maximum) + 1;
    }
 
    // Utility function to create a new tree node
    static Node newNode(int data)
    {
        Node curr = new Node();
        curr.data = data;
        curr.left = curr.right = null;
        return curr;
    }
 
    // Driver Code
    public static void main(String[] args)
    {
        Node root = newNode(7);
        root.left = newNode(6);
        root.right = newNode(5);
        root.left.left = newNode(4);
        root.left.right = newNode(3);
        root.right.left = newNode(2);
        root.right.right = newNode(1);
 
        System.out.println(getLength(root));
    }
}
 
// This code is contributed by Rajput-Ji
 
 

Python3




# Python3 program to print vertical width
# of a tree
 
# class to create a new tree node
 
 
class newNode:
    def __init__(self, data):
        self.data = data
        self.left = self.right = None
 
# get vertical width
 
 
def lengthUtil(root, maximum, minimum, curr=0):
    if (root == None):
        return
 
    # traverse left
    lengthUtil(root.left, maximum,
               minimum, curr - 1)
 
    # if curr is decrease then get
    # value in minimum
    if (minimum[0] > curr):
        minimum[0] = curr
 
    # if curr is increase then get
    # value in maximum
    if (maximum[0] < curr):
        maximum[0] = curr
 
    # traverse right
    lengthUtil(root.right, maximum,
               minimum, curr + 1)
 
 
def getLength(root):
    maximum = [0]
    minimum = [0]
    lengthUtil(root, maximum, minimum, 0)
 
    # 1 is added to include root in the width
    return (abs(minimum[0]) + maximum[0]) + 1
 
 
# Driver Code
if __name__ == '__main__':
 
    root = newNode(7)
    root.left = newNode(6)
    root.right = newNode(5)
    root.left.left = newNode(4)
    root.left.right = newNode(3)
    root.right.left = newNode(2)
    root.right.right = newNode(1)
 
    print(getLength(root))
 
# This code is contributed by PranchalK
 
 

C#




// C# program to print vertical width
// of a tree
using System;
 
class GFG {
 
    // A Binary Tree Node
    public class Node {
        public int data;
        public Node left, right;
    };
    static int maximum = 0, minimum = 0;
 
    // get vertical width
    static void lengthUtil(Node root, int curr)
    {
        if (root == null)
            return;
 
        // traverse left
        lengthUtil(root.left, curr - 1);
 
        // if curr is decrease then get
        // value in minimum
        if (minimum > curr)
            minimum = curr;
 
        // if curr is increase then get
        // value in maximum
        if (maximum < curr)
            maximum = curr;
 
        // traverse right
        lengthUtil(root.right, curr + 1);
    }
 
    static int getLength(Node root)
    {
        maximum = 0;
        minimum = 0;
        lengthUtil(root, 0);
 
        // 1 is added to include root in the width
        return (Math.Abs(minimum) + maximum) + 1;
    }
 
    // Utility function to create a new tree node
    static Node newNode(int data)
    {
        Node curr = new Node();
        curr.data = data;
        curr.left = curr.right = null;
        return curr;
    }
 
    // Driver Code
    public static void Main(String[] args)
    {
        Node root = newNode(7);
        root.left = newNode(6);
        root.right = newNode(5);
        root.left.left = newNode(4);
        root.left.right = newNode(3);
        root.right.left = newNode(2);
        root.right.right = newNode(1);
 
        Console.WriteLine(getLength(root));
    }
}
 
// This code is contributed by PrinciRaj1992
 
 

Javascript




<script>
 
// JavaScript program to prvertical width
// of a tree
 
// class to create a new tree node
class newNode{
    constructor(data){
        this.data = data
        this.left = this.right = null
    }
}
 
// get vertical width
function lengthUtil(root, maximum, minimum, curr = 0){
    if (root == null)
        return
 
    // traverse left
    lengthUtil(root.left, maximum,
                minimum, curr - 1)
 
    // if curr is decrease then get
    // value in minimum
    if (minimum[0] > curr)
        minimum[0] = curr
 
    // if curr is increase then get
    // value in maximum
    if (maximum[0] <curr)
        maximum[0] = curr
 
    // traverse right
    lengthUtil(root.right, maximum,
                 minimum, curr + 1)
}
 
function getLength(root)
{
    let maximum = [0]
    let minimum = [0]
    lengthUtil(root, maximum, minimum, 0)
 
    // 1 is added to include root in the width
    return (Math.abs(minimum[0]) + maximum[0]) + 1
}
 
// Driver Code
root = new newNode(7)
root.left = new newNode(6)
root.right = new newNode(5)
root.left.left = new newNode(4)
root.left.right = new newNode(3)
root.right.left = new newNode(2)
root.right.right = new newNode(1)
 
document.write(getLength(root),"</br>")
 
// This code is contributed by shinjanpatra.
 
</script>
 
 
Output
5

Time Complexity: O(n) 
Auxiliary Space: O(h) where h is the height of the binary tree. This much space is needed for recursive calls.

Find vertical width of Binary tree using Level Order Traversal:

Below is the idea to solve the problem:

Create a class to store the node and the horizontal level of the node. The horizontal level of left node will be 1 less than its parent, and horizontal level of the right node will be 1 more than its parent. We create a minLevel variable to store the minimum horizontal level or the leftmost node in the tree, and a maxLevel variable to store the maximum horizontal level or the rightmost node in the tree. Traverse the tree in level order and store the minLevel and maxLevel. In the end, print sum of maxLevel and absolute value of minLevel which is the vertical width of the tree.

Follow the below steps to Implement the idea:

  • Initialize two variables maxLevel = 0 and minLevel = 0 and queue Q of pair of the type (Node*, Integer).
  • Push (root, 0) in Q.
  • Run while loop till Q is not empty
    • Store the front node of the Queue in cur and the current horizontal level in count.
    • If curr->left is not null then push (root->left, count-1) and update minLevel with min(minLevel, count-1).
    • If curr->right is not null then push (root->right, count+1) and update maxLevel with max(maxLevel, count+1).
  • Print maxLevel + abs(minLevel) + 1.

Below is the Implementation of the above approach:

C++




// C++ program to find Vertical Height of a tree
 
#include <bits/stdc++.h>
#include <iostream>
 
using namespace std;
 
struct Node {
    int data;
    struct Node* left;
    struct Node* right;
 
    Node(int x)
    {
        data = x;
        left = right = NULL;
    }
};
 
int verticalWidth(Node* root)
{
    // Code here
    if (root == NULL)
        return 0;
 
    int maxLevel = 0, minLevel = 0;
    queue<pair<Node*, int> > q;
    q.push({ root, 0 }); // we take root as 0
 
    // Level order traversal code
    while (q.empty() != true) {
        Node* cur = q.front().first;
        int count = q.front().second;
        q.pop();
 
        if (cur->left) {
            minLevel = min(minLevel,
                           count - 1); // as we go left,
                                       // level is decreased
            q.push({ cur->left, count - 1 });
        }
 
        if (cur->right) {
            maxLevel = max(maxLevel,
                           count + 1); // as we go right,
                                       // level is increased
            q.push({ cur->right, count + 1 });
        }
    }
 
    return maxLevel + abs(minLevel)
           + 1; // +1 for the root node, we gave it a value
                // of zero
}
 
int main()
{
    // making the tree
    Node* root = new Node(7);
    root->left = new Node(6);
    root->right = new Node(5);
    root->left->left = new Node(4);
    root->left->right = new Node(3);
    root->right->left = new Node(2);
    root->right->right = new Node(1);
 
    cout << "Vertical width is : " << verticalWidth(root)
         << endl;
    return 0;
}
 
// code contributed by Anshit Bansal
 
 

Java




// Java program to print vertical width
// of a tree
import java.util.*;
 
class GFG {
 
    // A Binary Tree Node
    static class Node {
        int data;
        Node left, right;
    };
    static class Pair {
        Node node;
        int level; // Horizontal Level
        Pair(Node node, int level)
        {
            this.node = node;
            this.level = level;
        }
    }
    static int maxLevel = 0, minLevel = 0;
 
    // get vertical width
    static void lengthUtil(Node root)
    {
        Queue<Pair> q = new ArrayDeque<>();
 
        // Adding the root node initially with level as 0;
        q.add(new Pair(root, 0));
 
        while (q.size() > 0) {
            // removing the node at the peek of queue;
            Pair rem = q.remove();
 
            // If the left child of removed node exists
            if (rem.node.left != null) {
                // level of the left child will be 1 less
                // than its parent
                q.add(
                    new Pair(rem.node.left, rem.level - 1));
                // updating the minLevel
                minLevel
                    = Math.min(minLevel, rem.level - 1);
            }
 
            // If the right child of removed node exists
            if (rem.node.right != null) {
                // level of the right child will be 1 more
                // than its parent
                q.add(new Pair(rem.node.right,
                               rem.level + 1));
                // updating the minLevel
                maxLevel
                    = Math.max(minLevel, rem.level + 1);
            }
        }
    }
 
    static int getLength(Node root)
    {
        maxLevel = 0;
        minLevel = 0;
        lengthUtil(root);
 
        // 1 is added to include root in the width
        return (Math.abs(minLevel) + maxLevel) + 1;
    }
 
    // Utility function to create a new tree node
    static Node newNode(int data)
    {
        Node curr = new Node();
        curr.data = data;
        curr.left = curr.right = null;
        return curr;
    }
 
    // Driver Code
    public static void main(String[] args)
    {
        Node root = newNode(7);
        root.left = newNode(6);
        root.right = newNode(5);
        root.left.left = newNode(4);
        root.left.right = newNode(3);
        root.right.left = newNode(2);
        root.right.right = newNode(1);
 
        System.out.println(getLength(root));
    }
}
 
// This code is contributed by Archit Sharma
 
 

Python3




# Python code for the above approach
class Node:
   
  # A Binary Tree Node
    def __init__(self, data):
        self.data = data
        self.left = None
        self.right = None
         
# get vertical width
def verticalWidth(root):
    if root == None:
        return 0
 
    maxLevel = 0
    minLevel = 0
    q = []
     
    # Adding the root node initially with level as 0;
    q.append([root, 0])  # we take root as 0
 
    # Level order traversal code
    while len(q) != 0:
       
      # removing the node at the peek of queue;
        cur, count = q.pop(0)
         
# If the left child of removed node exists
        if cur.left:
 
         # updating the minLevel
            minLevel = min(minLevel, count - 1)
         
      # level of the left child will be 1 less than its parent
            q.append([cur.left, count - 1])
         
# If the right child of removed node exists
        if cur.right:
     
            # updating the maxLevel
            maxLevel = max(maxLevel, count + 1)
         
      # level of the right child will be 1 more
            # than its parent
            q.append([cur.right, count + 1])
 
    return maxLevel + abs(minLevel) + 1
 
 
# making the tree
root = Node(7)
root.left = Node(6)
root.right = Node(5)
root.left.left = Node(4)
root.left.right = Node(3)
root.right.left = Node(2)
root.right.right = Node(1)
 
print("Vertical width is : ", verticalWidth(root))
 
# This code is contributed by Potta Lokesh
 
 

C#




// C# program to print vertical width of a tree
using System;
using System.Collections;
 
public class GFG {
 
    // A Binary Tree Node
    class Node {
        public int data;
        public Node left, right;
    };
 
    class Pair {
        public Node node;
        public int level; // Horizontal Level
        public Pair(Node node, int level)
        {
            this.node = node;
            this.level = level;
        }
    }
 
    static int maxLevel = 0, minLevel = 0;
 
    // get vertical width
    static void lengthUtil(Node root)
    {
        Queue q = new Queue();
 
        // Adding the root node initially with level as 0;
        q.Enqueue(new Pair(root, 0));
 
        while (q.Count > 0) {
            // removing the node at the peek of queue;
            Pair rem = (Pair)q.Dequeue();
 
            // If the left child of removed node exists
            if (rem.node.left != null) {
                // level of the left child will be 1 less
                // than its parent
                q.Enqueue(
                    new Pair(rem.node.left, rem.level - 1));
                // updating the minLevel
                minLevel
                    = Math.Min(minLevel, rem.level - 1);
            }
 
            // If the right child of removed node exists
            if (rem.node.right != null) {
                // level of the right child will be 1 more
                // than its parent
                q.Enqueue(new Pair(rem.node.right,
                                   rem.level + 1));
                // updating the minLevel
                maxLevel
                    = Math.Max(minLevel, rem.level + 1);
            }
        }
    }
 
    static int getLength(Node root)
    {
        maxLevel = 0;
        minLevel = 0;
        lengthUtil(root);
 
        // 1 is added to include root in the width
        return (Math.Abs(minLevel) + maxLevel) + 1;
    }
 
    // Utility function to create a new tree node
    static Node newNode(int data)
    {
        Node curr = new Node();
        curr.data = data;
        curr.left = curr.right = null;
        return curr;
    }
 
    static public void Main()
    {
 
        // Code
        Node root = newNode(7);
        root.left = newNode(6);
        root.right = newNode(5);
        root.left.left = newNode(4);
        root.left.right = newNode(3);
        root.right.left = newNode(2);
        root.right.right = newNode(1);
 
        Console.WriteLine(getLength(root));
    }
}
 
// This code is contributed by lokeshmvs21.
 
 

Javascript




class Node {
  constructor(x) {
      this.data = x;
      this.left = null;
      this.right = null;
  }
}
 
function verticalWidth(root) {
  if (!root) {
      return 0;
  }
 
  let maxLevel = 0;
  let minLevel = 0;
  const q = [];
  q.push([root, 0]); // we take root as 0
 
  // Level order traversal code
  while (q.length !== 0) {
      const [cur, count] = q.shift();
 
      if (cur.left) {
          minLevel = Math.min(minLevel, count - 1); // as we go left, level is decreased
          q.push([cur.left, count - 1]);
      }
 
      if (cur.right) {
          maxLevel = Math.max(maxLevel, count + 1); // as we go right, level is increased
          q.push([cur.right, count + 1]);
      }
  }
 
  return maxLevel + Math.abs(minLevel) + 1; // +1 for the root node, we gave it a value of zero
}
 
// making the tree
const root = new Node(7);
root.left = new Node(6);
root.right = new Node(5);
root.left.left = new Node(4);
root.left.right = new Node(3);
root.right.left = new Node(2);
root.right.right = new Node(1);
 
console.log("Vertical width is: ", verticalWidth(root));
 
 
Output
5

Time Complexity: O(n). This much time is needed to traverse the tree.
Auxiliary Space: O(n). This much space is needed to maintain the queue.



Next Article
Vertical Sum in a given Binary Tree
author
devanshuagarwal
Improve
Article Tags :
  • DSA
  • Tree
  • Binary Tree
  • Data Structures-Binary Trees
  • Traversal
  • Trees
Practice Tags :
  • Traversal
  • Tree

Similar Reads

  • Vertical width of Binary tree | Set 2
    Given a binary tree, find the vertical width of the binary tree. The width of a binary tree is the number of vertical paths. Examples: Input : 7 / \ 6 5 / \ / \ 4 3 2 1 Output : 5 Input : 1 / \ 2 3 / \ / \ 4 5 6 7 \ \ 8 9 Output : 6 Prerequisite: Print Binary Tree in Vertical order In this image, th
    5 min read
  • Vertical Traversal of a Binary Tree
    Given a Binary Tree, the task is to find its vertical traversal starting from the leftmost level to the rightmost level. If multiple nodes pass through a vertical line, they should be printed as they appear in the level order traversal of the tree. Examples: Input: Output: [[4], [2], [1, 5, 6], [3,
    10 min read
  • Vertical Sum in a given Binary Tree
    Given a Binary Tree, find the vertical sum of the nodes that are in the same vertical line. Input: Output: 4 2 12 11 7 9Explanation: The below image shows the horizontal distances used to print vertical traversal starting from the leftmost level to the rightmost level. Table of Content Using map - O
    15 min read
  • Validate the Binary Tree Nodes
    Given N nodes numbered from 0 to n-1, also given the E number of directed edges, determine whether the given nodes all together form a single binary tree or not. Examples: Input: N = 4, edges[][] = [[0 1], [0 2], [2 3]] Output: trueExplanation: Form a single binary tree with a unique root node. Inpu
    7 min read
  • Sum of all vertical levels of a Binary Tree
    Given a binary tree consisting of either 1 or 0 as its node values, the task is to find the sum of all vertical levels of the Binary Tree, considering each value to be a binary representation. Examples: Input: 1 / \ 1 0 / \ / \ 1 0 1 0Output: 7Explanation: Taking vertical levels from left to right:F
    10 min read
  • Maximum width of a Binary Tree with null values | Set 2
    Pre-requisite: Maximum width of a Binary Tree with null value | Set 1 Given a Binary Tree consisting of N nodes, the task is to find the maximum width of the given tree without using recursion, where the maximum width is defined as the maximum of all the widths at each level of the given Tree. Note:
    8 min read
  • Vertical Traversal of a Binary Tree using BFS
    Given a Binary Tree, the task is to find its vertical traversal starting from the leftmost level to the rightmost level. Note that if multiple nodes at same level pass through a vertical line, they should be printed as they appear in the level order traversal of the tree. Examples: Input: Output: [[
    9 min read
  • Vertical Sum in Binary Tree (Space Optimized)
    Given a Binary Tree, find the vertical sum of the nodes that are in the same vertical line. Input: Output: 4 2 12 11 7 9Explanation: The below image shows the horizontal distances used to print vertical traversal starting from the leftmost level to the rightmost level. Approach: We have discussed Ha
    10 min read
  • Left View of a Binary Tree
    Given a Binary Tree, the task is to print the left view of the Binary Tree. The left view of a Binary Tree is a set of leftmost nodes for every level. Examples: Input: root[] = [1, 2, 3, 4, 5, N, N]Output: [1, 2, 4]Explanation: From the left side of the tree, only the nodes 1, 2, and 4 are visible.
    11 min read
  • Vertical Zig-Zag traversal of a Tree
    Given a Binary Tree, the task is to print the elements in the Vertical Zig-Zag traversal order. Vertical Zig-Zag traversal of a tree is defined as: Print the elements of the first level in the order from right to left, if there are no elements left then skip to the next level.Print the elements of t
    15 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