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 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:
Queries to evaluate the given equation in a range [L, R]
Next article icon

Queries to evaluate the given equation in a range [L, R]

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

Given an array arr[] consisting of N integers and queries Q[][] of the form {L, R} where 0 ? L < R ? N - 1, the task for each query is to calculate the following equation :

KL | KL + 1 |...| KR - 1 
where Ki = (arr[i] ^ arr[i+1]) | (arr[i] ~ arr[i+1]), 
"~" represents binary XNOR, 
"^" represents binary XOR , 
"|" represents binary OR 
 

Examples:

Input: arr[] = {5, 2, 3, 0}, Q[][] = {{1, 3}, {0, 2}} 
Output: 3 7 
Explanation: 
Query 1: L = 1, R = 3 : K1 = (2 ^ 3) | (2 ~ 3) = (3 | 2) = 3, K2 = (3 ^ 0) | (3 ~ 0) = (3 | 0) = 3. 
Therefore, K1 | K2 = (3 | 3) = 3 
Query 2: L = 0, R = 2 : K0 = 7, K1 = 3. 
Therefore, K0 | K1 = (7 | 3) = 7

Input: arr[] = {4, 0, 1, 2}, Q[][] = {{1, 3}} 
Output: 3 
 

Naive Approach: The simplest approach to solve this problem is to traverse the indices [L, R - 1], and for each element, calculate Ki, where L ? i < R.

Time Complexity: O(N * sizeof(Q))

Efficient Approach: To optimize the above approach, the idea is to use a Segment Tree or Sparse Table. Follow the steps below to solve the problem:

  • The following observation needs to be made:

XOR operation sets only those bits which are either set in arri or in arri+1 
XNOR sets those bits which are either set in both ai and ai+1 or not set in both.

  • Taking OR of both of these operations, all the bits up to the largest of the max(MSB(arri), MSB(arri+1)) will be set.
  • Therefore, find the largest number, using Segment Tree, in between the given indices and set all of its bits to 1, to obtain the required answer.
  • Print the answer.

Below is the implementation of the above approach:

C++
// C++ Program to implement // the above approach #include <bits/stdc++.h> using namespace std;  // Function to obtain the // middle index of the range int getMid(int s, int e) {     return s + (e - s) / 2; }  /* Recursive function to get the sum of     values in the given range from the array.     The following are parameters for this     function.       st     -> Pointer to segment tree       node     -> Index of current node in                  the segment tree      ss & se -> Starting and ending indexes                 of the segment represented                 by current node, i.e., st[node]       l & r -> Starting and ending indexes               of range query */ int MaxUtil(int* st, int ss, int se, int l,             int r, int node) {     // If the segment of this node lies     // completely within the given range     if (l <= ss && r >= se)          // Return maximum in the segment         return st[node];      // If the segment of this node lies     // outside the given range     if (se < l || ss > r)         return -1;      // If segment of this node lies     // partially in the given range     int mid = getMid(ss, se);      return max(MaxUtil(st, ss, mid, l, r,                        2 * node + 1),                MaxUtil(st, mid + 1, se, l,                        r, 2 * node + 2)); }  // Function to return the maximum in the // range from [l, r] int getMax(int* st, int n, int l, int r) {     // Check for erroneous input values     if (l < 0 || r > n - 1 || l > r) {         printf("Invalid Input");         return -1;     }      return MaxUtil(st, 0, n - 1, l, r, 0); }  // Function to construct Segment Tree // for the subarray [ss..se] int constructSTUtil(int arr[], int ss, int se,                     int* st, int si) {     // For a single element     if (ss == se) {         st[si] = arr[ss];         return arr[ss];     }      // Otherwise     int mid = getMid(ss, se);      // Recur for left subtree     st[si] = max(constructSTUtil(arr, ss, mid, st,                                  si * 2 + 1),                   // Recur for right subtree                  constructSTUtil(arr, mid + 1, se,                                  st, si * 2 + 2));      return st[si]; }  // Function to construct Segment Tree from // the given array int* constructST(int arr[], int n) {     // Height of Segment Tree     int x = (int)(ceil(log2(n)));      // Maximum size of Segment Tree     int max_size = 2 * (int)pow(2, x) - 1;      // Allocate memory     int* st = new int[max_size];      // Fill the allocated memory     constructSTUtil(arr, 0, n - 1, st, 0);      // Return the constructed Segment Tree     return st; }  // Driver Code int main() {     int arr[] = { 5, 2, 3, 0 };     int n = sizeof(arr) / sizeof(arr[0]);      // Build the Segment Tree     // from the given array     int* st = constructST(arr, n);      vector<vector<int> > Q = { { 1, 3 }, { 0, 2 } };     for (int i = 0; i < Q.size(); i++) {          int max = getMax(st, n, Q[i][0], Q[i][1]);         int ok = 0;         for (int i = 30; i >= 0; i--) {             if ((max & (1 << i)) != 0)                 ok = 1;              if (!ok)                 continue;              max |= (1 << i);         }          cout << max << " ";     }      return 0; } 
Java
// Java Program to implement // the above approach import java.util.*; class GFG{  // Function to obtain the // middle index of the range static int getMid(int s, int e) {     return s + (e - s) / 2; }  /* Recursive function to get the sum of     values in the given range from the array.     The following are parameters for this     function.       st    .Pointer to segment tree       node    .Index of current node in                  the segment tree      ss & se.Starting and ending indexes                 of the segment represented                 by current node, i.e., st[node]       l & r.Starting and ending indexes               of range query */ static int MaxUtil(int[] st, int ss,                     int se, int l,                     int r, int node) {     // If the segment of this node lies     // completely within the given range     if (l <= ss && r >= se)          // Return maximum in the segment         return st[node];      // If the segment of this node lies     // outside the given range     if (se < l || ss > r)         return -1;      // If segment of this node lies     // partially in the given range     int mid = getMid(ss, se);      return Math.max(MaxUtil(st, ss, mid, l, r,                                 2 * node + 1),                        MaxUtil(st, mid + 1, se, l,                              r, 2 * node + 2)); }  // Function to return the maximum in the // range from [l, r] static int getMax(int []st, int n,                   int l, int r) {     // Check for erroneous input values     if (l < 0 || r > n - 1 || l > r)     {         System.out.printf("Invalid Input");         return -1;     }      return MaxUtil(st, 0, n - 1, l, r, 0); }  // Function to construct Segment Tree // for the subarray [ss..se] static int constructSTUtil(int arr[], int ss,                             int se, int[] st,                            int si) {     // For a single element     if (ss == se)      {         st[si] = arr[ss];         return arr[ss];     }      // Otherwise     int mid = getMid(ss, se);      // Recur for left subtree     st[si] = Math.max(constructSTUtil(arr, ss, mid, st,                                             si * 2 + 1),                        // Recur for right subtree                       constructSTUtil(arr, mid + 1, se,                                        st, si * 2 + 2));      return st[si]; }  // Function to construct Segment Tree from // the given array static int[] constructST(int arr[], int n) {     // Height of Segment Tree     int x = (int)(Math.ceil(Math.log(n)));      // Maximum size of Segment Tree     int max_size = 2 * (int)Math.pow(2, x) - 1;      // Allocate memory     int []st = new int[max_size];      // Fill the allocated memory     constructSTUtil(arr, 0, n - 1, st, 0);      // Return the constructed Segment Tree     return st; }  // Driver Code public static void main(String[] args) {     int arr[] = { 5, 2, 3, 0 };     int n = arr.length;      // Build the Segment Tree     // from the given array     int []st = constructST(arr, n);      int[][] Q = { { 1, 3 }, { 0, 2 } };     for (int i = 0; i < Q.length; i++)      {         int max = getMax(st, n, Q[i][0], Q[i][1]);         int ok = 0;         for (int j = 30; j >= 0; j--)          {             if ((max & (1 << j)) != 0)                 ok = 1;              if (ok<=0)                 continue;              max |= (1 << j);         }         System.out.print(max+ " ");     } } }  // This code is contributed by gauravrajput1  
Python3
# Python3 program to implement # the above approach import math  # Function to obtain the # middle index of the range def getMid(s, e):          return (s + (e - s) // 2)  def MaxUtil(st, ss, se, l, r, node):          # If the segment of this node lies     # completely within the given range     if (l <= ss and r >= se):                  # Return maximum in the segment         return st[node]      # If the segment of this node lies     # outside the given range     if (se < l or ss > r):         return -1      # If segment of this node lies     # partially in the given range     mid = getMid(ss, se)      return max(MaxUtil(st, ss, mid, l,                         r, 2 * node + 1),                 MaxUtil(st, mid + 1, se,                         l, r, 2 * node + 2))  # Function to return the maximum # in the range from [l, r] def getMax(st, n, l, r):          # Check for erroneous input values     if (l < 0 or r > n - 1 or l > r):         print("Invalid Input")         return -1          return MaxUtil(st, 0, n - 1, l, r, 0)  # Function to construct Segment Tree # for the subarray [ss..se] def constructSTUtil(arr, ss, se, st, si):      # For a single element     if (ss == se):         st[si] = arr[ss]         return arr[ss]      # Otherwise     mid = getMid(ss, se)      # Recur for left subtree     st[si] = max(constructSTUtil(arr, ss, mid, st,                                  si * 2 + 1),                  constructSTUtil(arr, mid + 1, se,                                   st, si * 2 + 2))     return st[si]  # Function to construct Segment Tree # from the given array def constructST(arr, n):      # Height of Segment Tree     x = (int)(math.ceil(math.log(n)))      # Maximum size of Segment Tree     max_size = 2 * (int)(pow(2, x)) - 1      # Allocate memory     st = [0] * max_size      # Fill the allocated memory     constructSTUtil(arr, 0, n - 1, st, 0)      # Return the constructed Segment Tree     return st  # Driver Code arr = [ 5, 2, 3, 0 ] n = len(arr)  # Build the Segment Tree # from the given array st = constructST(arr, n)  Q = [ [ 1, 3 ], [ 0, 2 ] ] for i in range(len(Q)):     Max = getMax(st, n, Q[i][0], Q[i][1])     ok = 0          for j in range(30, -1, -1):         if ((Max & (1 << j)) != 0):             ok = 1          if (ok <= 0):             continue          Max |= (1 << j)          print(Max, end = " ")  # This code is contributed by divyesh072019 
C#
// C# Program to implement // the above approach using System; class GFG {      // Function to obtain the     // middle index of the range     static int getMid(int s, int e)     {         return s + (e - s) / 2;     }      /* Recursive function to get the sum of     values in the given range from the array.     The following are parameters for this     function:     st--> Pointer to segment tree     node--> Index of current node     in segment tree     ss & se--> Starting and ending indexes     of the segment represented     by current node, i.e., st[node]     l & r--> Starting and ending indexes     of range query */     static int MaxUtil(int[] st, int ss, int se,                         int l, int r, int node)     {          // If the segment of this node lies         // completely within the given range         if (l <= ss && r >= se)              // Return maximum in the segment             return st[node];          // If the segment of this node lies         // outside the given range         if (se < l || ss > r)             return -1;          // If segment of this node lies         // partially in the given range         int mid = getMid(ss, se);          return Math.Max(             MaxUtil(st, ss, mid, l, r, 2 * node + 1),             MaxUtil(st, mid + 1, se, l, r, 2 * node + 2));     }      // Function to return the maximum     // in the range from [l, r]     static int getMax(int[] st, int n, int l, int r)     {         // Check for erroneous input values         if (l < 0 || r > n - 1 || l > r)          {             Console.Write("Invalid Input");             return -1;         }         return MaxUtil(st, 0, n - 1, l, r, 0);     }      // Function to construct Segment Tree     // for the subarray [ss..se]     static int constructSTUtil(int[] arr, int ss, int se,                                int[] st, int si)     {         // For a single element         if (ss == se)          {             st[si] = arr[ss];             return arr[ss];         }          // Otherwise         int mid = getMid(ss, se);          // Recur for left subtree         st[si] = Math.Max(             constructSTUtil(arr, ss, mid, st,                              si * 2 + 1),              // Recur for right subtree             constructSTUtil(arr, mid + 1, se, st,                             si * 2 + 2));         return st[si];     }      // Function to construct Segment Tree     // from the given array     static int[] constructST(int[] arr, int n)     {         // Height of Segment Tree         int x = (int)(Math.Ceiling(Math.Log(n)));          // Maximum size of Segment Tree         int max_size = 2 * (int)Math.Pow(2, x) - 1;          // Allocate memory         int[] st = new int[max_size];          // Fill the allocated memory         constructSTUtil(arr, 0, n - 1, st, 0);          // Return the constructed Segment Tree         return st;     }      // Driver Code     public static void Main(String[] args)     {         int[] arr = {5, 2, 3, 0};         int n = arr.Length;          // Build the Segment Tree         // from the given array         int[] st = constructST(arr, n);          int[, ] Q = {{1, 3}, {0, 2}};         for (int i = 0; i < Q.GetLength(0); i++) {             int max = getMax(st, n, Q[i, 0], Q[i, 1]);             int ok = 0;             for (int j = 30; j >= 0; j--) {                 if ((max & (1 << j)) != 0)                     ok = 1;                  if (ok <= 0)                     continue;                  max |= (1 << j);             }             Console.Write(max + " ");         }     } }  // This code is contributed by Amit Katiyar 
JavaScript
<script>  // JavaScript program for the above approach   // Function to obtain the // middle index of the range function getMid(s, e) {     return (s + Math.floor((e - s) / 2)); }   /* Recursive function to get the sum of    values in the given range from the array.    The following are parameters for this    function.       st    .Pointer to segment tree       node    .Index of current node in                 the segment tree       ss & se.Starting and ending indexes                of the segment represented                by current node, i.e., st[node]       l & r.Starting and ending indexes              of range query */ function MaxUtil(st, ss,                    se, l,                    r, node) {     // If the segment of this node lies     // completely within the given range     if (l <= ss && r >= se)           // Return maximum in the segment         return st[node];       // If the segment of this node lies     // outside the given range     if (se < l || ss > r)         return -1;       // If segment of this node lies     // partially in the given range     let mid = getMid(ss, se);       return Math.max(MaxUtil(st, ss, mid, l, r,                                 2 * node + 1),                        MaxUtil(st, mid + 1, se, l,                              r, 2 * node + 2)); }   // Function to return the maximum in the // range from [l, r] function getMax(st, n, l, r) {     // Check for erroneous input values     if (l < 0 || r > n - 1 || l > r)     {         document.write("Invalid Input");         return -1;     }       return MaxUtil(st, 0, n - 1, l, r, 0); }   // Function to construct Segment Tree // for the subarray [ss..se] function constructSTUtil(arr, ss, se, st,                            si) {     // For a single element     if (ss == se)     {         st[si] = arr[ss];         return arr[ss];     }       // Otherwise     let mid = getMid(ss, se);       // Recur for left subtree     st[si] = Math.max(constructSTUtil(arr, ss, mid, st,                                             si * 2 + 1),                         // Recur for right subtree                       constructSTUtil(arr, mid + 1, se,                                        st, si * 2 + 2));       return st[si]; }   // Function to construct Segment Tree from // the given array function constructST(arr, n) {     // Height of Segment Tree     let x = (Math.ceil(Math.log(n)));       // Maximum size of Segment Tree     let max_size = 2 * Math.pow(2, x) - 1;       // Allocate memory     let st = Array.from({length: max_size}, (_, i) => 0);        // Fill the allocated memory     constructSTUtil(arr, 0, n - 1, st, 0);       // Return the constructed Segment Tree     return st; }      // Driver Code          let arr = [ 5, 2, 3, 0 ];     let n = arr.length;       // Build the Segment Tree     // from the given array     let st = constructST(arr, n);       let Q = [[ 1, 3 ], [ 0, 2 ]];     for (let i = 0; i < Q.length; i++)     {         let max = getMax(st, n, Q[i][0], Q[i][1]);         let ok = 0;         for (let j = 30; j >= 0; j--)         {             if ((max & (1 << j)) != 0)                 ok = 1;               if (ok<=0)                 continue;               max |= (1 << j);         }         document.write(max+ " ");     }       </script> 

Output: 
3 7

 

Time Complexity: O(N*log(sizeof(Q)) 
Auxiliary Space: O(N)

Related Topic: Segment Tree


Next Article
Queries to evaluate the given equation in a range [L, R]

C

chsadik99
Improve
Article Tags :
  • Bit Magic
  • Tree
  • Searching
  • Mathematical
  • Advanced Data Structure
  • Competitive Programming
  • Recursion
  • C++ Programs
  • DSA
  • Arrays
  • Segment-Tree
Practice Tags :
  • Advanced Data Structure
  • Arrays
  • Bit Magic
  • Mathematical
  • Recursion
  • Searching
  • Segment-Tree
  • Tree

Similar Reads

    Segment Tree
    Segment Tree is a data structure that allows efficient querying and updating of intervals or segments of an array. It is particularly useful for problems involving range queries, such as finding the sum, minimum, maximum, or any other operation over a specific range of elements in an array. The tree
    3 min read
    Segment tree meaning in DSA
    A segment tree is a data structure used to effectively query and update ranges of array members. It's typically implemented as a binary tree, with each node representing a segment or range of array elements. Segment tree Characteristics of Segment Tree:A segment tree is a binary tree with a leaf nod
    2 min read
    Introduction to Segment Trees - Data Structure and Algorithm Tutorials
    A Segment Tree is used to store information about array intervals in its nodes.It allows efficient range queries over array intervals.Along with queries, it allows efficient updates of array items.For example, we can perform a range summation of an array between the range L to R in O(Log n) while al
    15+ min read
    Persistent Segment Tree | Set 1 (Introduction)
    Prerequisite : Segment Tree Persistency in Data Structure Segment Tree is itself a great data structure that comes into play in many cases. In this post we will introduce the concept of Persistency in this data structure. Persistency, simply means to retain the changes. But obviously, retaining the
    15+ min read
    Segment tree | Efficient implementation
    Let us consider the following problem to understand Segment Trees without recursion.We have an array arr[0 . . . n-1]. We should be able to, Find the sum of elements from index l to r where 0 <= l <= r <= n-1Change the value of a specified element of the array to a new value x. We need to d
    12 min read
    Iterative Segment Tree (Range Maximum Query with Node Update)
    Given an array arr[0 . . . n-1]. The task is to perform the following operation: Find the maximum of elements from index l to r where 0 <= l <= r <= n-1.Change value of a specified element of the array to a new value x. Given i and x, change A[i] to x, 0 <= i <= n-1. Examples: Input:
    14 min read
    Range Sum and Update in Array : Segment Tree using Stack
    Given an array arr[] of N integers. The task is to do the following operations: Add a value X to all the element from index A to B where 0 ? A ? B ? N-1.Find the sum of the element from index L to R where 0 ? L ? R ? N-1 before and after the update given to the array above.Example: Input: arr[] = {1
    15+ min read
    Dynamic Segment Trees : Online Queries for Range Sum with Point Updates
    Prerequisites: Segment TreeGiven a number N which represents the size of the array initialized to 0 and Q queries to process where there are two types of queries: 1 P V: Put the value V at position P.2 L R: Output the sum of values from L to R. The task is to answer these queries. Constraints: 1 ? N
    15+ min read
    Applications, Advantages and Disadvantages of Segment Tree
    First, let us understand why we need it prior to landing on the introduction so as to get why this concept was introduced. Suppose we are given an array and we need to find out the subarray Purpose of Segment Trees: A segment tree is a data structure that deals with a range of queries over an array.
    4 min read

    Lazy Propagation

    Lazy Propagation in Segment Tree
    Segment tree is introduced in previous post with an example of range sum problem. We have used the same "Sum of given Range" problem to explain Lazy propagation   How does update work in Simple Segment Tree? In the previous post, update function was called to update only a single value in array. Ple
    15+ min read
    Lazy Propagation in Segment Tree | Set 2
    Given an array arr[] of size N. There are two types of operations: Update(l, r, x) : Increment the a[i] (l <= i <= r) with value x.Query(l, r) : Find the maximum value in the array in a range l to r (both are included).Examples: Input: arr[] = {1, 2, 3, 4, 5} Update(0, 3, 4) Query(1, 4) Output
    15+ min read
    Flipping Sign Problem | Lazy Propagation Segment Tree
    Given an array of size N. There can be multiple queries of the following types. update(l, r) : On update, flip( multiply a[i] by -1) the value of a[i] where l <= i <= r . In simple terms, change the sign of a[i] for the given range.query(l, r): On query, print the sum of the array in given ran
    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