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:
Introduction to Binary Search Tree
Next article icon

Create a Doubly Linked List from a Ternary Tree

Last Updated : 01 Jul, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

Given a ternary tree, create a doubly linked list out of it. A ternary tree is just like a binary tree but instead of having two nodes, it has three nodes i.e. left, middle, and right.

The doubly linked list should hold the following properties –  

  1. The left pointer of the ternary tree should act as prev pointer of the doubly linked list.
  2. The middle pointer of the ternary tree should not point to anything.
  3. Right pointer of the ternary tree should act as the next pointer of the doubly linked list.
  4. Each node of the ternary tree is inserted into the doubly linked list before its subtrees and for any node, its left child will be inserted first, followed by the mid and right child (if any).

For the above example, the linked list formed for below tree should be NULL <- 30 <-> 5 <-> 1 <-> 4 <-> 8 <-> 11 <-> 6 <-> 7 <-> 15 <-> 63 <-> 31 <-> 55 <-> 65 -> NULL 

tree

We strongly recommend you to minimize your browser and try this yourself first.

The idea is to traverse the tree in a preorder fashion similar to binary tree preorder traversal. Here, when we visit a node, we will insert it into a doubly linked list, in the end, using a tail pointer. That we use to maintain the required insertion order. We then recursively call for left child, middle child and right child in that order.

Below is the implementation of this idea. 

C++




// C++ program to create a doubly linked list out
// of given a ternary tree.
#include <bits/stdc++.h>
using namespace std;
 
/* A ternary tree */
struct Node
{
    int data;
    struct Node *left, *middle, *right;
};
 
/* Helper function that allocates a new node with the
   given data and assign NULL to left, middle and right
   pointers.*/
Node* newNode(int data)
{
    Node* node = new Node;
    node->data = data;
    node->left = node->middle = node->right = NULL;
    return node;
}
 
/* Utility function that constructs doubly linked list
by inserting current node at the end of the doubly
linked list by using a tail pointer */
void push(Node** tail_ref, Node* node)
{
    // initialize tail pointer
    if (*tail_ref == NULL)
    {
        *tail_ref = node;
 
        // set left, middle and right child to point
        // to NULL
        node->left = node->middle = node->right = NULL;
 
        return;
    }
 
    // insert node in the end using tail pointer
    (*tail_ref)->right = node;
 
    // set prev of node
    node->left = (*tail_ref);
 
    // set middle and right child to point to NULL
    node->right = node->middle = NULL;
 
    // now tail pointer will point to inserted node
    (*tail_ref) = node;
}
 
/* Create a doubly linked list out of given a ternary tree.
by traversing the tree in preorder fashion. */
void TernaryTreeToList(Node* root, Node** head_ref)
{
    // Base case
    if (root == NULL)
        return;
 
    //create a static tail pointer
    static Node* tail = NULL;
 
    // store left, middle and right nodes
    // for future calls.
    Node* left = root->left;
    Node* middle = root->middle;
    Node* right = root->right;
 
    // set head of the doubly linked list
    // head will be root of the ternary tree
    if (*head_ref == NULL)
        *head_ref = root;
 
    // push current node in the end of DLL
    push(&tail, root);
 
    //recurse for left, middle and right child
    TernaryTreeToList(left, head_ref);
    TernaryTreeToList(middle, head_ref);
    TernaryTreeToList(right, head_ref);
}
 
// Utility function for printing double linked list.
void printList(Node* head)
{
    printf("Created Double Linked list is:\n");
    while (head)
    {
        printf("%d ", head->data);
        head = head->right;
    }
}
 
// Driver program to test above functions
int main()
{
    // Constructing ternary tree as shown in above figure
    Node* root = newNode(30);
 
    root->left = newNode(5);
    root->middle = newNode(11);
    root->right = newNode(63);
 
    root->left->left = newNode(1);
    root->left->middle = newNode(4);
    root->left->right = newNode(8);
 
    root->middle->left = newNode(6);
    root->middle->middle = newNode(7);
    root->middle->right = newNode(15);
 
    root->right->left = newNode(31);
    root->right->middle = newNode(55);
    root->right->right = newNode(65);
 
    Node* head = NULL;
 
    TernaryTreeToList(root, &head);
 
    printList(head);
 
    return 0;
}
 
 

Java




//Java program to create a doubly linked list
// from a given ternary tree.
 
//Custom node class.
class newNode
{
    int data;
    newNode left,middle,right;
    public newNode(int data)
    {
        this.data = data;
        left = middle = right = null;
    }
}
 
class GFG {
     
    //tail of the linked list.
    static newNode tail;
 
    //function to push the node to the tail.
    public static void push(newNode node)
    {
        //to put the node at the end of
        // the already existing tail.
        tail.right = node;                
         
        //to point to the previous node.
        node.left = tail;        
         
        // middle pointer should point to
        // nothing so null. initiate right
        // pointer to null.
        node.middle = node.right = null;
         
        //update the tail position.
        tail = node;            
    }
     
    /* Create a doubly linked list out of given a ternary tree.
    by traversing the tree in preorder fashion. */
    public static void ternaryTree(newNode node,newNode head)
    {
        if(node == null)
            return;                    
        newNode left = node.left;
        newNode middle = node.middle;
        newNode right = node.right;
        if(tail != node)
         
            // already root is in the tail so dont push
            // the node when it was root.In the first
            // case both node and tail have root in them.
            push(node);            
             
        // First the left child is to be taken.
        // Then middle and then right child.
        ternaryTree(left,head);        
        ternaryTree(middle,head);
        ternaryTree(right,head);
    }
 
    //function to initiate the list process.
    public static newNode startTree(newNode root)
    {
        //Initiate the head and tail with root.
        newNode head = root;
        tail = root;
        ternaryTree(root,head);
         
        //since the head,root are passed
        // with reference the changes in
        // root will be reflected in head.
        return head;        
    }
     
    // Utility function for printing double linked list.
    public static void printList(newNode head)
    {
        System.out.print("Created Double Linked list is:\n");
        while(head != null)
        {
            System.out.print(head.data + " ");
            head = head.right;
        }
    }
     
    // Driver program to test above functions
    public static void main(String args[])
    {
         
        // Constructing ternary tree as shown
        // in above figure
        newNode root = new newNode(30);
        root.left = new newNode(5);
        root.middle = new newNode(11);
        root.right = new newNode(63);
        root.left.left = new newNode(1);
        root.left.middle = new newNode(4);
        root.left.right = new newNode(8);
        root.middle.left = new newNode(6);
        root.middle.middle = new newNode(7);
        root.middle.right = new newNode(15);
        root.right.left = new newNode(31);
        root.right.middle = new newNode(55);
        root.right.right = new newNode(65);
         
        // The function which initiates the list
        // process returns the head.
        newNode head = startTree(root);        
        printList(head);
    }
}
 
// This code is contributed by M.V.S.Surya Teja.
 
 

Python3




# Python3 program to create a doubly linked
# list out of given a ternary tree.
   
# Custom node class.
class newNode:
     
    def __init__(self, data):
         
        self.data = data
        self.left = None
        self.right = None
        self.middle = None
 
class GFG:
     
    def __init__(self):
         
        # Tail of the linked list.
        self.tail = None
 
    # Function to push the node to the tail.
    def push(self, node):
 
        # To put the node at the end of
        # the already existing tail.
        self.tail.right = node
 
        # To point to the previous node.
        node.left = self.tail
 
        # Middle pointer should point to 
        # nothing so null. initiate right
        # pointer to null.
        node.middle = node.right = None
 
        # Update the tail position.
        self.tail = node
 
    # Create a doubly linked list out of given
    # a ternary tree By traversing the tree in
    # preorder fashion.
    def ternaryTree(self, node, head):
         
        if node == None:
            return
 
        left = node.left
        middle = node.middle
        right = node.right
         
        if self.tail != node:
             
            # Already root is in the tail so dont push 
            # the node when it was root.In the first 
            # case both node and tail have root in them.
            self.push(node)
 
        # First the left child is to be taken.
        # Then middle and then right child.
        self.ternaryTree(left, head) 
        self.ternaryTree(middle, head)
        self.ternaryTree(right, head)
 
    def startTree(self, root):
         
        # Initiate the head and tail with root.
        head = root
        self.tail = root
        self.ternaryTree(root, head)
 
        # Since the head,root are passed 
        # with reference the changes in 
        # root will be reflected in head.
        return head
 
    # Utility function for printing double linked list.
    def printList(self, head):
         
        print("Created Double Linked list is:")
         
        while head:
            print(head.data, end = " ")
            head = head.right
 
# Driver code
if __name__ == '__main__':
     
    # Constructing ternary tree as shown
    # in above figure
    root = newNode(30)
    root.left = newNode(5)
    root.middle = newNode(11)
    root.right = newNode(63)
    root.left.left = newNode(1)
    root.left.middle = newNode(4)
    root.left.right = newNode(8)
    root.middle.left = newNode(6)
    root.middle.middle = newNode(7)
    root.middle.right = newNode(15)
    root.right.left = newNode(31)
    root.right.middle = newNode(55)
    root.right.right = newNode(65)
 
    # The function which initiates the list 
    # process returns the head.
    head = None
    gfg = GFG()
    head = gfg.startTree(root)
     
    gfg.printList(head)
 
# This code is contributed by Winston Sebastian Pais
 
 

C#




// C# program to create a doubly linked
// list from a given ternary tree.
using System;
 
// Custom node class.
public class newNode
{
    public int data;
    public newNode left, middle, right;
    public newNode(int data)
    {
        this.data = data;
        left = middle = right = null;
    }
}
 
class GFG
{
 
// tail of the linked list.
public static newNode tail;
 
// function to push the node to the tail.
public static void push(newNode node)
{
    // to put the node at the end of
    // the already existing tail.
    tail.right = node;
 
    // to point to the previous node.
    node.left = tail;
 
    // middle pointer should point to
    // nothing so null. initiate right
    // pointer to null.
    node.middle = node.right = null;
 
    // update the tail position.
    tail = node;
}
 
/* Create a doubly linked list out
of given a ternary tree. by traversing
the tree in preorder fashion. */
public static void ternaryTree(newNode node,
                               newNode head)
{
    if (node == null)
    {
        return;
    }
    newNode left = node.left;
    newNode middle = node.middle;
    newNode right = node.right;
    if (tail != node)
    {
 
        // already root is in the tail so dont push
        // the node when it was root.In the first
        // case both node and tail have root in them.
        push(node);
    }
 
    // First the left child is to be taken.
    // Then middle and then right child.
    ternaryTree(left, head);
    ternaryTree(middle, head);
    ternaryTree(right, head);
}
 
// function to initiate the list process.
public static newNode startTree(newNode root)
{
    // Initiate the head and tail with root.
    newNode head = root;
    tail = root;
    ternaryTree(root,head);
 
    // since the head,root are passed
    // with reference the changes in
    // root will be reflected in head.
    return head;
}
 
// Utility function for printing
// double linked list.
public static void printList(newNode head)
{
    Console.Write("Created Double Linked list is:\n");
    while (head != null)
    {
        Console.Write(head.data + " ");
        head = head.right;
    }
}
 
// Driver Code
public static void Main(string[] args)
{
 
    // Constructing ternary tree as shown
    // in above figure
    newNode root = new newNode(30);
    root.left = new newNode(5);
    root.middle = new newNode(11);
    root.right = new newNode(63);
    root.left.left = new newNode(1);
    root.left.middle = new newNode(4);
    root.left.right = new newNode(8);
    root.middle.left = new newNode(6);
    root.middle.middle = new newNode(7);
    root.middle.right = new newNode(15);
    root.right.left = new newNode(31);
    root.right.middle = new newNode(55);
    root.right.right = new newNode(65);
 
    // The function which initiates the list
    // process returns the head.
    newNode head = startTree(root);
    printList(head);
}
}
 
// This code is contributed by Shrikant13
 
 

Javascript




<script>
//javascript program to create a doubly linked list
// from a given ternary tree.
 
//Custom node class.
class newNode {
     
    constructor(data) {
        this.data = data;
        this.left = null;
        this.middle = null;
        this.right = null;
    }
}
    // tail of the linked list.
     var tail;
 
    // function to push the node to the tail.
    function push( node) {
        // to put the node at the end of
        // the already existing tail.
        tail.right = node;
 
        // to point to the previous node.
        node.left = tail;
 
        // middle pointer should point to
        // nothing so null. initiate right
        // pointer to null.
        node.middle = node.right = null;
 
        // update the tail position.
        tail = node;
    }
 
    /*
     * Create a doubly linked list out of given a ternary tree. by traversing the
     * tree in preorder fashion.
     */
    function ternaryTree( node,  head) {
        if (node == null)
            return;
        var left = node.left;
        var middle = node.middle;
        var right = node.right;
        if (tail != node)
 
            // already root is in the tail so dont push
            // the node when it was root.In the first
            // case both node and tail have root in them.
            push(node);
 
        // First the left child is to be taken.
        // Then middle and then right child.
        ternaryTree(left, head);
        ternaryTree(middle, head);
        ternaryTree(right, head);
    }
 
    // function to initiate the list process.
      function startTree( root) {
        // Initiate the head and tail with root.
        var head = root;
        tail = root;
        ternaryTree(root, head);
 
        // since the head,root are passed
        // with reference the changes in
        // root will be reflected in head.
        return head;
    }
 
    // Utility function for printing var linked list.
    function printList( head) {
        document.write("Created Double Linked list is:<br/>");
        while (head != null) {
            document.write(head.data + " ");
            head = head.right;
        }
    }
 
    // Driver program to test above functions
     
 
        // Constructing ternary tree as shown
        // in above figure
         root = new newNode(30);
        root.left = new newNode(5);
        root.middle = new newNode(11);
        root.right = new newNode(63);
        root.left.left = new newNode(1);
        root.left.middle = new newNode(4);
        root.left.right = new newNode(8);
        root.middle.left = new newNode(6);
        root.middle.middle = new newNode(7);
        root.middle.right = new newNode(15);
        root.right.left = new newNode(31);
        root.right.middle = new newNode(55);
        root.right.right = new newNode(65);
 
        // The function which initiates the list
        // process returns the head.
         head = startTree(root);
        printList(head);
 
// This code contributed by gauravrajput1
</script>
 
 
Output
Created Double Linked list is: 30 5 1 4 8 11 6 7 15 63 31 55 65 

Time Complexity: O(n), as we are using recursion to traverse n times. Where n is the number of nodes in the tree.
Auxiliary Space: O(n), as we are using extra space for the linked list.

 



Next Article
Introduction to Binary Search Tree

A

Aditya Goel
Improve
Article Tags :
  • DSA
  • Linked List
  • Tree
  • doubly linked list
Practice Tags :
  • Linked List
  • Tree

Similar Reads

  • Introduction to Tree Data Structure
    Tree data structure is a hierarchical structure that is used to represent and organize data in the form of parent child relationship. The following are some real world situations which are naturally a tree. Folder structure in an operating system.Tag structure in an HTML (root tag the as html tag) o
    15+ min read
  • Tree Traversal Techniques
    Tree Traversal techniques include various ways to visit all the nodes of the tree. Unlike linear data structures (Array, Linked List, Queues, Stacks, etc) which have only one logical way to traverse them, trees can be traversed in different ways. In this article, we will discuss all the tree travers
    7 min read
  • Applications of tree data structure
    A tree is a type of data structure that represents a hierarchical relationship between data elements, called nodes. The top node in the tree is called the root, and the elements below the root are called child nodes. Each child node may have one or more child nodes of its own, forming a branching st
    4 min read
  • Advantages and Disadvantages of Tree
    Tree is a non-linear data structure. It consists of nodes and edges. A tree represents data in a hierarchical organization. It is a special type of connected graph without any cycle or circuit. Advantages of Tree:Efficient searching: Trees are particularly efficient for searching and retrieving data
    2 min read
  • Difference between an array and a tree
    Array:An array is a collection of homogeneous(same type) data items stored in contiguous memory locations. For example, if an array is of type “int”, it can only store integer elements and cannot allow the elements of other types such as double, float, char, etc. The array is a linear data structure
    3 min read
  • Inorder Tree Traversal without Recursion
    Given a binary tree, the task is to perform in-order traversal of the tree without using recursion. Example: Input: Output: 4 2 5 1 3Explanation: Inorder traversal (Left->Root->Right) of the tree is 4 2 5 1 3 Input: Output: 1 7 10 8 6 10 5 6Explanation: Inorder traversal (Left->Root->Rig
    8 min read
  • Types of Trees in Data Structures
    A tree in data structures is a hierarchical data structure that consists of nodes connected by edges. It is used to represent relationships between elements, where each node holds data and is connected to other nodes in a parent-child relationship. Types of Trees The main types of trees in data stru
    4 min read
  • Generic Trees (N-ary Tree)

    • Introduction to Generic Trees (N-ary Trees)
      Generic trees are a collection of nodes where each node is a data structure that consists of records and a list of references to its children(duplicate references are not allowed). Unlike the linked list, each node stores the address of multiple nodes. Every node stores address of its children and t
      5 min read

    • Inorder traversal of an N-ary Tree
      Given an N-ary tree containing, the task is to print the inorder traversal of the tree. Examples:  Input: N = 3   Output: 5 6 2 7 3 1 4Input: N = 3   Output: 2 3 5 1 4 6  Approach: The inorder traversal of an N-ary tree is defined as visiting all the children except the last then the root and finall
      6 min read

    • Preorder Traversal of an N-ary Tree
      Given an N-ary Tree. The task is to write a program to perform the preorder traversal of the given n-ary tree. Examples: Input: 3-Array Tree 1 / | \ / | \ 2 3 4 / \ / | \ 5 6 7 8 9 / / | \ 10 11 12 13 Output: 1 2 5 10 6 11 12 13 3 4 7 8 9 Input: 3-Array Tree 1 / | \ / | \ 2 3 4 / \ / | \ 5 6 7 8 9 O
      14 min read

    • Iterative Postorder Traversal of N-ary Tree
      Given an N-ary tree, the task is to find the post-order traversal of the given tree iteratively.Examples: Input: 1 / | \ 3 2 4 / \ 5 6 Output: [5, 6, 3, 2, 4, 1] Input: 1 / \ 2 3 Output: [2, 3, 1] Approach:We have already discussed iterative post-order traversal of binary tree using one stack. We wi
      10 min read

    • Level Order Traversal of N-ary Tree
      Given an N-ary Tree. The task is to print the level order traversal of the tree where each level will be in a new line. Examples: Input: Output: 13 2 45 6Explanation: At level 1: only 1 is present.At level 2: 3, 2, 4 is presentAt level 3: 5, 6 is present Input: Output: 12 3 4 56 7 8 9 1011 12 1314Ex
      11 min read

    • ZigZag Level Order Traversal of an N-ary Tree
      Given a Generic Tree consisting of n nodes, the task is to find the ZigZag Level Order Traversal of the given tree.Note: A generic tree is a tree where each node can have zero or more children nodes. Unlike a binary tree, which has at most two children per node (left and right), a generic tree allow
      8 min read

    Binary Tree

    • Introduction to Binary Tree
      Binary Tree is a non-linear and hierarchical data structure where each node has at most two children referred to as the left child and the right child. The topmost node in a binary tree is called the root, and the bottom-most nodes are called leaves. Representation of Binary TreeEach node in a Binar
      15+ min read

    • Properties of Binary Tree
      This post explores the fundamental properties of a binary tree, covering its structure, characteristics, and key relationships between nodes, edges, height, and levels Note: Height of root node is considered as 0. Properties of Binary Trees1. Maximum Nodes at Level 'l'A binary tree can have at most
      4 min read

    • Applications, Advantages and Disadvantages of Binary Tree
      A binary tree is a tree that has at most two children for any of its nodes. There are several types of binary trees. To learn more about them please refer to the article on "Types of binary tree" Applications:General ApplicationsDOM in HTML: Binary trees help manage the hierarchical structure of web
      2 min read

    • Binary Tree (Array implementation)
      Given an array that represents a tree in such a way that array indexes are values in tree nodes and array values give the parent node of that particular index (or node). The value of the root node index would always be -1 as there is no parent for root. Construct the standard linked representation o
      6 min read

    • Complete Binary Tree
      We know a tree is a non-linear data structure. It has no limitation on the number of children. A binary tree has a limitation as any node of the tree has at most two children: a left and a right child. What is a Complete Binary Tree?A complete binary tree is a special type of binary tree where all t
      7 min read

    • Perfect Binary Tree
      What is a Perfect Binary Tree? A perfect binary tree is a special type of binary tree in which all the leaf nodes are at the same depth, and all non-leaf nodes have two children. In simple terms, this means that all leaf nodes are at the maximum depth of the tree, and the tree is completely filled w
      4 min read

    Ternary Tree

    • Create a Doubly Linked List from a Ternary Tree
      Given a ternary tree, create a doubly linked list out of it. A ternary tree is just like a binary tree but instead of having two nodes, it has three nodes i.e. left, middle, and right. The doubly linked list should hold the following properties – The left pointer of the ternary tree should act as pr
      12 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