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 Tutorial
  • Data Structures
  • Algorithms
  • Array
  • Strings
  • Linked List
  • Stack
  • Queue
  • Tree
  • Graph
  • Searching
  • Sorting
  • Recursion
  • Dynamic Programming
  • Binary Tree
  • Binary Search Tree
  • Heap
  • Hashing
  • Divide & Conquer
  • Mathematical
  • Geometric
  • Bitwise
  • Greedy
  • Backtracking
  • Branch and Bound
  • Matrix
  • Pattern Searching
  • Randomized
Open In App
Next Article:
Mean of range in array
Next article icon

GCDs of given index ranges in an Array

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

Given an array arr[] of size N and Q queries of type {qs, qe} where qs and qe denote the starting and ending index of the query, the task is to find the GCD of all the numbers in the range.

Examples:

Input: arr[] = {2, 3, 60, 90, 50};
Index Ranges: {1, 3}, {2, 4}, {0, 2}
Output: GCDs of given ranges are 3, 10, 1
Explanation: Elements in the range [1, 3] are {3, 60, 90}.
The GCD of the numbers is 3.
Elements in the range [2, 4] are {60, 90, 50}.
The GCD of the numbers is 10.
Elements in the range [0, 2] are {2, 3, 60}.
The GCD of the numbers is 1 as 2 and 3 are co-prime.

Naive Approach:

A simple solution is to run a loop from qs to qe for every query and find GCD in the given range. Time required to find gcd of all the elements from qs to qe will be O(N*log(Ai)) i.e do a linear scan and find the gcd of each adjacent pair in O(log(Ai))
So, the overall time complexity will be O(Q*N*log(Ai)).

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

GCD of Range using 2D Array:

Another approach is to create a 2D array where an entry [i, j] stores the GCD of elements in range arr[i . . . j]. GCD of a given range can now be calculated in O(1) time. 

Time Complexity: O(N2 + Q) preprocessing takes O(N2) time and O(Q) time to answer Q queries.
Auxiliary Space: O(N2)

GCD of range using Segment Tree:

Prerequisites: Segment Tree Set 1, Segment Tree Set 2 

Segment tree can be used to do preprocessing and query in moderate time. With a segment tree, we can store the GCD of a segment and use that later on for calculating the GCD of given range. 

This can be divided into the following steps:

Representation of Segment tree

  • Leaf Nodes are the elements of the input array.
  • Each internal node represents the GCD of all leaves under it.
  • Array representation of the tree is used to represent Segment Trees i.e., for each node at index i,
    • The Left child is at index 2*i+1
    • Right child at 2*i+2 and 
    • the parent is at floor((i-1)/2).

Construction of Segment Tree from the given array

  • Begin with a segment arr[0 . . . n-1] and keep dividing into two halves (if it has not yet become a segment of length 1), 
    • Call the same procedure on both halves,.
      • Each parent node will store the value of GCD(left node, right node).

Query for GCD of given range

  • For every query, move to the left and right halves of the tree. 
    • Whenever the given range completely overlaps any halve of a tree, return the node from that half without traversing further in that region. 
    • When a halve of the tree completely lies outside the given range, return 0 (as GCD(0, x) = x). 
    • On partial overlapping of range, traverse in left and right halves and return accordingly.

Below is the implementation of the above approach. 

C++




// C++ Program to find GCD of a number in a given Range
// using segment Trees
#include <bits/stdc++.h>
using namespace std;
 
// To store segment tree
int* st;
 
/*  A recursive function to get gcd of given
    range of array indexes. The following are parameters for
    this function.
 
    st    --> Pointer to segment tree
    si --> Index of current node in the segment tree.
   Initially 0 is passed as root is always at index 0 ss &
   se  --> Starting and ending indexes of the segment
                 represented by current node, i.e.,
   st[index] qs & qe  --> Starting and ending indexes of
   query range */
int findGcd(int ss, int se, int qs, int qe, int si)
{
    if (ss > qe || se < qs)
        return 0;
    if (qs <= ss && qe >= se)
        return st[si];
    int mid = ss + (se - ss) / 2;
    return __gcd(findGcd(ss, mid, qs, qe, si * 2 + 1),
                 findGcd(mid + 1, se, qs, qe, si * 2 + 2));
}
 
// Finding The gcd of given Range
int findRangeGcd(int ss, int se, int arr[], int n)
{
    if (ss < 0 || se > n - 1 || ss > se) {
        cout << "Invalid Arguments"
             << "\n";
        return -1;
    }
    return findGcd(0, n - 1, ss, se, 0);
}
 
// A recursive function that constructs Segment Tree for
// array[ss..se]. si is index of current node in segment
// tree st
int constructST(int arr[], int ss, int se, int si)
{
    if (ss == se) {
        st[si] = arr[ss];
        return st[si];
    }
    int mid = ss + (se - ss) / 2;
    st[si]
        = __gcd(constructST(arr, ss, mid, si * 2 + 1),
                constructST(arr, mid + 1, se, si * 2 + 2));
    return st[si];
}
 
/* Function to construct segment tree from given array.
   This function allocates memory for segment tree and
   calls constructSTUtil() to fill the allocated memory */
int* constructSegmentTree(int arr[], int n)
{
    int height = (int)(ceil(log2(n)));
    int size = 2 * (int)pow(2, height) - 1;
    st = new int[size];
    constructST(arr, 0, n - 1, 0);
    return st;
}
 
// Driver program to test above functions
int main()
{
    int a[] = { 2, 3, 6, 9, 5 };
    int n = sizeof(a) / sizeof(a[0]);
 
    // Build segment tree from given array
    constructSegmentTree(a, n);
 
    // Starting index of range. These indexes are 0 based.
    int l = 1;
 
    // Last index of range.These indexes are 0 based.
    int r = 3;
    cout << "GCD of the given range is:";
    cout << findRangeGcd(l, r, a, n) << "\n";
 
    return 0;
}
 
 

Java




// Java Program to find GCD of a number in a given Range
// using segment Trees
import java.io.*;
 
public class Main {
    private static int[] st; // Array to store segment tree
 
    /* Function to construct segment tree from given array.
       This function allocates memory for segment tree and
       calls constructSTUtil() to fill the allocated memory
     */
    public static int[] constructSegmentTree(int[] arr)
    {
        int height = (int)Math.ceil(Math.log(arr.length)
                                    / Math.log(2));
        int size = 2 * (int)Math.pow(2, height) - 1;
        st = new int[size];
        constructST(arr, 0, arr.length - 1, 0);
        return st;
    }
 
    // A recursive function that constructs Segment
    // Tree for array[ss..se]. si is index of current
    // node in segment tree st
    public static int constructST(int[] arr, int ss, int se,
                                  int si)
    {
        if (ss == se) {
            st[si] = arr[ss];
            return st[si];
        }
        int mid = ss + (se - ss) / 2;
        st[si] = gcd(
            constructST(arr, ss, mid, si * 2 + 1),
            constructST(arr, mid + 1, se, si * 2 + 2));
        return st[si];
    }
 
    // Function to find gcd of 2 numbers.
    private static int gcd(int a, int b)
    {
        if (a < b) {
            // If b greater than a swap a and b
            int temp = b;
            b = a;
            a = temp;
        }
 
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
 
    // Finding The gcd of given Range
    public static int findRangeGcd(int ss, int se,
                                   int[] arr)
    {
        int n = arr.length;
 
        if (ss < 0 || se > n - 1 || ss > se)
            throw new IllegalArgumentException(
                "Invalid arguments");
 
        return findGcd(0, n - 1, ss, se, 0);
    }
 
    /*  A recursive function to get gcd of given
    range of array indexes. The following are parameters for
    this function.
 
    st    --> Pointer to segment tree
    si --> Index of current node in the segment tree.
    Initially 0 is passed as root is always at index 0 ss &
    se  --> Starting and ending indexes of the segment
                 represented by current node, i.e., st[si]
    qs & qe  --> Starting and ending indexes of query range
  */
    public static int findGcd(int ss, int se, int qs,
                              int qe, int si)
    {
        if (ss > qe || se < qs)
            return 0;
 
        if (qs <= ss && qe >= se)
            return st[si];
 
        int mid = ss + (se - ss) / 2;
 
        return gcd(
            findGcd(ss, mid, qs, qe, si * 2 + 1),
            findGcd(mid + 1, se, qs, qe, si * 2 + 2));
    }
 
    // Driver Code
    public static void main(String[] args)
        throws IOException
    {
        int[] a = { 2, 3, 6, 9, 5 };
 
        constructSegmentTree(a);
 
        int l = 1; // Starting index of range.
        int r = 3; // Last index of range.
        System.out.print("GCD of the given range is: ");
        System.out.print(findRangeGcd(l, r, a));
    }
}
 
 

Python3




import math
 
# To store segment tree
st = []
 
# A recursive function to get gcd of given
# range of array indexes. The following are parameters for
# this function.
# st --> Pointer to segment tree
# si --> Index of current node in the segment tree.
# Initially 0 is passed as root is always at index 0
# ss & se --> Starting and ending indexes of the segment
#            represented by current node, i.e., st[index]
# qs & qe --> Starting and ending indexes of query range
def findGcd(ss, se, qs, qe, si):
    if ss > qe or se < qs:
        return 0
    if qs <= ss and qe >= se:
        return st[si]
    mid = ss + (se - ss) // 2
    return math.gcd(findGcd(ss, mid, qs, qe, si * 2 + 1),
                    findGcd(mid + 1, se, qs, qe, si * 2 + 2))
 
# Finding the gcd of given range
def findRangeGcd(ss, se, arr, n):
    if ss < 0 or se > n - 1 or ss > se:
        print("Invalid Arguments")
        return -1
    return findGcd(0, n - 1, ss, se, 0)
 
# A recursive function that constructs Segment Tree for
# array[ss..se]. si is index of current node in segment
# tree st
def constructST(arr, ss, se, si):
    if ss == se:
        st[si] = arr[ss]
        return st[si]
    mid = ss + (se - ss) // 2
    st[si] = math.gcd(constructST(arr, ss, mid, si * 2 + 1),
                      constructST(arr, mid + 1, se, si * 2 + 2))
    return st[si]
 
# Function to construct segment tree from given array.
# This function allocates memory for segment tree and
# calls constructSTUtil() to fill the allocated memory
def constructSegmentTree(arr, n):
    height = math.ceil(math.log2(n))
    size = 2 * pow(2, height) - 1
    global st
    st = [0] * size
    constructST(arr, 0, n - 1, 0)
    return st
 
# Driver program to test above functions
a = [2, 3, 6, 9, 5]
n = len(a)
 
# Build segment tree from given array
constructSegmentTree(a, n)
 
# Starting index of range. These indexes are 0 based.
l = 1
 
# Last index of range. These indexes are 0 based.
r = 3
 
print("GCD of the given range is:", findRangeGcd(l, r, a, n))
 
 

C#




// C# Program to find GCD of a number in a given Range
// using segment Trees
using System;
 
class GFG {
    private static int[] st; // Array to store segment tree
 
    /* Function to construct segment tree from given array.
    This function allocates memory for segment tree and
    calls constructSTUtil() to fill the allocated memory */
    public static int[] constructSegmentTree(int[] arr)
    {
        int height = (int)Math.Ceiling(Math.Log(arr.Length)
                                       / Math.Log(2));
        int size = 2 * (int)Math.Pow(2, height) - 1;
        st = new int[size];
        constructST(arr, 0, arr.Length - 1, 0);
        return st;
    }
 
    // A recursive function that constructs Segment
    // Tree for array[ss..se]. si is index of current
    // node in segment tree st
    public static int constructST(int[] arr, int ss, int se,
                                  int si)
    {
        if (ss == se) {
            st[si] = arr[ss];
            return st[si];
        }
        int mid = ss + (se - ss) / 2;
        st[si] = gcd(
            constructST(arr, ss, mid, si * 2 + 1),
            constructST(arr, mid + 1, se, si * 2 + 2));
        return st[si];
    }
 
    // Function to find gcd of 2 numbers.
    private static int gcd(int a, int b)
    {
        if (a < b) {
            // If b greater than a swap a and b
            int temp = b;
            b = a;
            a = temp;
        }
 
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
 
    // Finding The gcd of given Range
    public static int findRangeGcd(int ss, int se,
                                   int[] arr)
    {
        int n = arr.Length;
 
        if (ss < 0 || se > n - 1 || ss > se) {
            Console.WriteLine("Invalid arguments");
            return int.MinValue;
        }
 
        return findGcd(0, n - 1, ss, se, 0);
    }
 
    /* A recursive function to get gcd of given
    range of array indexes. The following are parameters for
    this function.
 
    st --> Pointer to segment tree
    si --> Index of current node in the segment tree.
    Initially 0 is passed as root is always at index 0 ss &
    se --> Starting and ending indexes of the segment
                represented by current node, i.e., st[si]
    qs & qe --> Starting and ending indexes of query range
  */
    public static int findGcd(int ss, int se, int qs,
                              int qe, int si)
    {
        if (ss > qe || se < qs)
            return 0;
 
        if (qs <= ss && qe >= se)
            return st[si];
 
        int mid = ss + (se - ss) / 2;
 
        return gcd(
            findGcd(ss, mid, qs, qe, si * 2 + 1),
            findGcd(mid + 1, se, qs, qe, si * 2 + 2));
    }
 
    // Driver Code
    public static void Main(String[] args)
    {
        int[] a = { 2, 3, 6, 9, 5 };
 
        constructSegmentTree(a);
 
        int l = 1; // Starting index of range.
        int r = 3; // Last index of range.
        Console.Write("GCD of the given range is: ");
        Console.Write(findRangeGcd(l, r, a));
    }
}
 
// This code has been contributed by 29AjayKumar
 
 

Javascript




<script>
 
// Javascript Program to find GCD of a number in a given Range
// using segment Trees
let st = []; // Array to store segment tree
 
/* Function to construct segment tree from given array.
   This function allocates memory for segment tree and
   calls constructSTUtil() to fill the allocated memory */
function constructSegmentTree(arr) {
    let height = Math.floor(Math.ceil(Math.log(arr.length) / Math.log(2)));
    let size = 2 * Math.pow(2, height) - 1;
    st = new Array(size);
    constructST(arr, 0, arr.length - 1, 0);
    return st;
}
 
// A recursive function that constructs Segment
// Tree for array[ss..se]. si is index of current
// node in segment tree st
function constructST(arr, ss, se, si) {
    if (ss == se) {
        st[si] = arr[ss];
        return st[si];
    }
    let mid = Math.floor(ss + (se - ss) / 2);
    st[si] = gcd(constructST(arr, ss, mid, si * 2 + 1),
        constructST(arr, mid + 1, se, si * 2 + 2));
    return st[si];
}
 
// Function to find gcd of 2 numbers.
function gcd(a, b) {
    if (a < b) {
        // If b greater than a swap a and b
        let temp = b;
        b = a;
        a = temp;
    }
 
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
 
//Finding The gcd of given Range
function findRangeGcd(ss, se, arr) {
    let n = arr.length;
 
    if (ss < 0 || se > n - 1 || ss > se)
        throw new Error("Invalid arguments");
 
    return findGcd(0, n - 1, ss, se, 0);
}
 
/*  A recursive function to get gcd of given
range of array indexes. The following are parameters for
this function.
 
st    --> Pointer to segment tree
si --> Index of current node in the segment tree. Initially
           0 is passed as root is always at index 0
ss & se  --> Starting and ending indexes of the segment
             represented by current node, i.e., st[si]
qs & qe  --> Starting and ending indexes of query range */
function findGcd(ss, se, qs, qe, si) {
    if (ss > qe || se < qs)
        return 0;
 
    if (qs <= ss && qe >= se)
        return st[si];
 
    let mid = Math.floor(ss + (se - ss) / 2);
 
    return gcd(findGcd(ss, mid, qs, qe, si * 2 + 1),
        findGcd(mid + 1, se, qs, qe, si * 2 + 2));
}
 
// Driver Code
 
let a = [2, 3, 6, 9, 5]
 
constructSegmentTree(a);
 
let l = 1; // Starting index of range.
let r = 3; //Last index of range.
document.write("GCD of the given range is: ");
document.write(findRangeGcd(l, r, a));
 
// This code is contributed by saurabh_jaiswaal.
</script>
 
 

Output:

 GCD of the given range is: 3

Time Complexity: 

  • Time Complexity for tree construction is O(N * log(min(a, b))), where N is the number of modes and a and b are nodes whose GCD is calculated during the merge operation. 
  • Time complexity for each to query is O(log N * log(min(a, b))). 

Auxiliary Space: O(N)



Next Article
Mean of range in array

N

Nikhil Tekwani
Improve
Article Tags :
  • Advanced Data Structure
  • DSA
  • array-range-queries
  • Segment-Tree
Practice Tags :
  • Advanced Data Structure
  • Segment-Tree

Similar Reads

  • PreComputation Technique on Arrays
    Precomputation refers to the process of pre-calculating and storing the results of certain computations or data structures(array in this case) in advance, in order to speed up the execution time of a program. This can be useful in situations where the same calculations are needed multiple times, as
    15 min read
  • Queries for the product of first N factorials
    Given Q[] queries where each query consists of an integer N, the task is to find the product of first N factorials for each of the query. Since the result could be large, compute it modulo 109 + 7.Examples: Input: Q[] = {4, 5} Output: 288 34560 Query 1: 1! * 2! * 3! * 4! = 1 * 2 * 6 * 24 = 288 Query
    7 min read
  • Range sum queries without updates
    Given an array arr of integers of size n. We need to compute the sum of elements from index i to index j. The queries consisting of i and j index values will be executed multiple times. Examples: Input : arr[] = {1, 2, 3, 4, 5} i = 1, j = 3 i = 2, j = 4Output : 9 12 Input : arr[] = {1, 2, 3, 4, 5} i
    6 min read
  • Range Queries for Frequencies of array elements
    Given an array of n non-negative integers. The task is to find frequency of a particular element in the arbitrary range of array[]. The range is given as positions (not 0 based indexes) in array. There can be multiple queries of given type. Examples: Input : arr[] = {2, 8, 6, 9, 8, 6, 8, 2, 11}; lef
    13 min read
  • Count Primes in Ranges
    Given a 2d array queries[][] of size n, where each query queries[i] contain 2 elements [l, r], your task is to find the count of number of primes in inclusive range [l, r] Examples: Input: queries[][] = [ [1, 10], [5, 10], [11, 20] ]Output: 4 2 4Explanation: For query 1, number of primes in range [1
    12 min read
  • Check in binary array the number represented by a subarray is odd or even
    Given an array such that all its terms is either 0 or 1.You need to tell the number represented by a subarray a[l..r] is odd or even Examples : Input : arr = {1, 1, 0, 1} l = 1, r = 3 Output : odd number represented by arr[l...r] is 101 which 5 in decimal form which is odd Input : arr = {1, 1, 1, 1}
    4 min read
  • GCDs of given index ranges in an Array
    Given an array arr[] of size N and Q queries of type {qs, qe} where qs and qe denote the starting and ending index of the query, the task is to find the GCD of all the numbers in the range. Examples: Input: arr[] = {2, 3, 60, 90, 50};Index Ranges: {1, 3}, {2, 4}, {0, 2}Output: GCDs of given ranges a
    14 min read
  • Mean of range in array
    Given an array arr[] of n integers and q queries represented by an array queries[][], where queries[i][0] = l and queries[i][1] = r. For each query, the task is to calculate the mean of elements in the range l to r and return its floor value. Examples: Input: arr[] = [3, 7, 2, 8, 5] queries[][] = [[
    12 min read
  • Difference Array | Range update query in O(1)
    You are given an integer array arr[] and a list of queries. Each query is represented as a list of integers where: [1, l, r, x]: Adds x to all elements from arr[l] to arr[r] (inclusive).[2]: Prints the current state of the array.You need to perform the queries in order. Examples : Input: arr[] = [10
    11 min read
  • Range sum query using Sparse Table
    We have an array arr[]. We need to find the sum of all the elements in the range L and R where 0 <= L <= R <= n-1. Consider a situation when there are many range queries. Examples: Input : 3 7 2 5 8 9 query(0, 5) query(3, 5) query(2, 4) Output : 34 22 15Note : array is 0 based indexed and q
    8 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