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 Hash
  • Practice Hash
  • MCQs on Hash
  • Hashing Tutorial
  • Hash Function
  • Index Mapping
  • Collision Resolution
  • Open Addressing
  • Separate Chaining
  • Quadratic probing
  • Double Hashing
  • Load Factor and Rehashing
  • Advantage & Disadvantage
Open In App
Next Article:
Find the two repeating elements in a given array
Next article icon

Find any one of the multiple repeating elements in read only array

Last Updated : 24 Mar, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

Given a read-only array of size ( n+1 ), find one of the multiple repeating elements in the array where the array contains integers only between 1 and n. 
A read-only array means that the contents of the array can’t be modified.
Examples: 

Input : n = 5          arr[] = {1, 1, 2, 3, 5, 4}  Output : One of the numbers repeated in the array is: 1    Input : n = 10          arr[] = {10, 1, 2, 3, 5, 4, 9, 8, 5, 6, 4}  Output : One of the numbers repeated in the array is: 4 OR 5

Method 1: Since the size of the array is n+1 and elements range from 1 to n then it is confirmed that there will be at least one repeating element. A simple solution is to create a count array and store counts of all elements. As soon as we encounter an element with a count of more than 1, we return it.

Below is the implementation of the above approach:

C++




// C++ program to find one of the repeating
// elements in a read only array
#include <bits/stdc++.h>
using namespace std;
  
// Function to find one of the repeating
// elements
int findRepeatingNumber(const int arr[], int n)
{
    for (int i = 0; i < n; i++) {
        int count = 0;
        for (int j = 0; j < n; j++) {
            if (arr[i] == arr[j])
                count++;
        }
        if (count > 1)
            return arr[i];
    }
    // If no repeating element exists
    return -1;
}
  
// Driver Code
int main()
{
    // Read only array
    const int arr[] = { 1, 1, 2, 3, 5, 4 };
  
    int n = 5;
  
    cout << "One of the numbers repeated in"
            " the array is: "
         << findRepeatingNumber(arr, n) << endl;
}
 
 

Java




public class GFG {
    // Java program to find one of the repeating
    // elements in a read only array
  
    // Function to find one of the repeating
    // elements
    public static int findRepeatingNumber(int[] arr, int n)
    {
        for (int i = 0; i < n; i++) {
            int count = 0;
            for (int j = 0; j < n; j++) {
                if (arr[i] == arr[j]) {
                    count++;
                }
            }
            if (count > 1) {
                return arr[i];
            }
        }
        // If no repeating element exists
        return -1;
    }
  
    // Driver Code
    public static void main(String[] args)
    {
        // Read only array
        final int[] arr = { 1, 1, 2, 3, 5, 4 };
  
        int n = 5;
  
        System.out.print("One of the numbers repeated in"
                         + " the array is: ");
        System.out.print(findRepeatingNumber(arr, n));
        System.out.print("\n");
    }
}
// This code is contributed by Aarti_Rathi
 
 

Python3




# Python 3program to find one of the repeating
# elements in a read only array
from math import sqrt
  
# Function to find one of the repeating
# elements
def findRepeatingNumber(arr, n):
      
    for i in arr:
      count = 0;
      for j in arr:
        if i == j:
          count=count+1
      if(count>1):
        return i
      
    # return -1 if no repeating element exists
    return -1
  
# Driver Code
if __name__ == '__main__':
      
    # read only array, not to be modified
    arr = [1, 1, 2, 3, 5, 4]
  
    # array of size 6(n + 1) having
    # elements between 1 and 5
    n = 5
  
    print("One of the numbers repeated in the array is:",
                             findRepeatingNumber(arr, n))
      
# This code is contributed by Arpit Jain
 
 

C#




// C# program to find one of the repeating
// elements in a read only array
using System;
  
public class GFG {
  
  // Function to find one of the repeating
  // elements
  public static int findRepeatingNumber(int[] arr, int n)
  {
    for (int i = 0; i < n; i++) {
      int count = 0;
      for (int j = 0; j < n; j++) {
        if (arr[i] == arr[j]) {
          count++;
        }
      }
      if (count > 1) {
        return arr[i];
      }
    }
    // If no repeating element exists
    return -1;
  }
  
  // Driver Code
  public static void Main(String[] args)
  {
    // Read only array
    int[] arr = { 1, 1, 2, 3, 5, 4 };
  
    int n = 5;
  
    Console.Write("One of the numbers repeated in"
                  + " the array is: ");
    Console.Write(findRepeatingNumber(arr, n));
    Console.Write("\n");
  }
}
  
// This code is contributed by Abhijeet Kumar(abhijeet19403)
 
 

Javascript




<script>
// Javascript program to find one of the
// repeating elements in a read only array.
  
    // Function to find one of the repeating
    // elements
    function findRepeatingNumber(arr, n){
        for (let i = 0; i < n; i++) {
            let count = 0;
            for (let j = 0; j < n; j++) {
                if (arr[i] == arr[j]) {
                    count++;
                }
            }
            if (count > 1) {
                return arr[i];
            }
        }
        // If no repeating element exists
        return -1;
    }
  
    const arr = [ 1, 1, 2, 3, 5, 4 ];
    let n = 5;
      
    document.write("One of the numbers repeated in the array is: " + findRepeatingNumber(arr, n));
     
   // This code is contributed by lokeshmvs21.
</script>
 
 
Output
One of the numbers repeated in the array is: 1

Time Complexity: O(n2)
Auxiliary Space: O(1)

A space-optimized solution is to break the given range (from 1 to n) into blocks of size equal to sqrt(n). We maintain the count of elements belonging to each block for every block. Now as the size of an array is (n+1) and blocks are of size sqrt(n), then there will be one such block whose size will be more than sqrt(n). For the block whose count is greater than sqrt(n), we can use hashing for the elements of this block to find which element appears more than once. 
Explanation: 
The method described above works because of the following two reasons: 

  1. There would always be a block that has a count greater than sqrt(n) because of one extra element. Even when one extra element has been added it will occupy a position in one of the blocks only, making that block to be selected.
  2. The selected block definitely has a repeating element. Consider that ith block is selected. The size of the block is greater than sqrt(n) (Hence, it is selected) Maximum distinct elements in this block = sqrt(n). Thus, size can be greater than sqrt(n) only if there is a repeating element in range ( i*sqrt(n), (i+1)*sqrt(n) ].

Note: The last block formed may or may not have a range equal to sqrt(n). Thus, checking if this block has a repeating element will be different than other blocks. However, this difficulty can be overcome from the implementation point of view by initializing the selected block with the last block. This is safe because at least one block has to get selected.
Below is the step-by-step algorithm to solve this problem: 

  1. Divide the array into blocks of size sqrt(n).
  2. Make a count array that stores the count of elements for each block.
  3. Pick up the block which has a count of more than sqrt(n), setting the last block 
    as default.
  4. For the elements belonging to the selected block, use the method of hashing(explained in the next step) to find the repeating element in that block.
  5. We can create a hash array of key-value pairs, where the key is the element in the block and the value is the count of a number of times the given key is appearing. This can be easily implemented using unordered_map in C++ STL.

Below is the implementation of the above idea:

C++




// C++ program to find one of the repeating
// elements in a read only array
#include <bits/stdc++.h>
using namespace std;
  
// Function to find one of the repeating
// elements
int findRepeatingNumber(const int arr[], int n)
{
    // Size of blocks except the
    // last block is sq
    int sq = sqrt(n);
  
    // Number of blocks to incorporate 1 to
    // n values blocks are numbered from 0
    // to range-1 (both included)
    int range = (n / sq) + 1;
  
    // Count array maintains the count for
    // all blocks
    int count[range] = {0};
  
    // Traversing the read only array and
    // updating count
    for (int i = 0; i <= n; i++)
    {
        // arr[i] belongs to block number
        // (arr[i]-1)/sq i is considered
        // to start from 0
        count[(arr[i] - 1) / sq]++;
    }
  
    // The selected_block is set to last
    // block by default. Rest of the blocks
    // are checked
    int selected_block = range - 1;
    for (int i = 0; i < range - 1; i++)
    {
        if (count[i] > sq)
        {
            selected_block = i;
            break;
        }
    }
  
    // after finding block with size > sq
    // method of hashing is used to find
    // the element repeating in this block
    unordered_map<int, int> m;
    for (int i = 0; i <= n; i++)
    {
        // checks if the element belongs to the
        // selected_block
        if ( ((selected_block * sq) < arr[i]) &&
                (arr[i] <= ((selected_block + 1) * sq)))
        {
            m[arr[i]]++;
  
            // repeating element found
            if (m[arr[i]] > 1)
                return arr[i];
        }
    }
  
    // return -1 if no repeating element exists
    return -1;
}
  
// Driver Program
int main()
{
    // read only array, not to be modified
    const int arr[] = { 1, 1, 2, 3, 5, 4 };
  
    // array of size 6(n + 1) having
    // elements between 1 and 5
    int n = 5;
  
    cout << "One of the numbers repeated in"
         " the array is: "
         << findRepeatingNumber(arr, n) << endl;
}
 
 

Java




// Java program to find one of the repeating 
// elements in a read only array 
import java.io.*;
import java.util.*;
  
class GFG
{
  
    // Function to find one of the repeating 
    // elements 
    static int findRepeatingNumber(int[] arr, int n)
    {
        // Size of blocks except the 
        // last block is sq 
        int sq = (int) Math.sqrt(n);
  
        // Number of blocks to incorporate 1 to 
        // n values blocks are numbered from 0 
        // to range-1 (both included) 
        int range = (n / sq) + 1;
  
        // Count array maintains the count for 
        // all blocks 
        int[] count = new int[range];
  
        // Traversing the read only array and 
        // updating count 
        for (int i = 0; i <= n; i++)
        {
            // arr[i] belongs to block number 
            // (arr[i]-1)/sq i is considered 
            // to start from 0 
            count[(arr[i] - 1) / sq]++;
        }
  
        // The selected_block is set to last 
        // block by default. Rest of the blocks 
        // are checked 
        int selected_block = range - 1;
        for (int i = 0; i < range - 1; i++) 
        { 
            if (count[i] > sq) 
            { 
                selected_block = i; 
                break; 
            } 
        }
  
        // after finding block with size > sq 
        // method of hashing is used to find 
        // the element repeating in this block 
        HashMap<Integer, Integer> m = new HashMap<>();
        for (int i = 0; i <= n; i++)
        {
            // checks if the element belongs to the 
            // selected_block 
            if ( ((selected_block * sq) < arr[i]) && 
                    (arr[i] <= ((selected_block + 1) * sq))) 
            { 
                m.put(arr[i], 1);
  
                // repeating element found
                if (m.get(arr[i]) == 1) 
                    return arr[i]; 
            } 
        }
  
        // return -1 if no repeating element exists 
        return -1; 
}
  
// Driver code
public static void main(String args[])
{
    // read only array, not to be modified 
    int[] arr = { 1, 1, 2, 3, 5, 4 };
  
    // array of size 6(n + 1) having 
    // elements between 1 and 5 
    int n = 5;
  
    System.out.println("One of the numbers repeated in the array is: " + 
                                    findRepeatingNumber(arr, n));
}
}
  
// This code is contributed by rachana soma
 
 

Python3




# Python 3program to find one of the repeating
# elements in a read only array
from math import sqrt
  
# Function to find one of the repeating
# elements
def findRepeatingNumber(arr, n):
      
    # Size of blocks except the
    # last block is sq
    sq = sqrt(n)
  
    # Number of blocks to incorporate 1 to
    # n values blocks are numbered from 0
    # to range-1 (both included)
    range__= int((n / sq) + 1)
  
    # Count array maintains the count for
    # all blocks
    count = [0 for i in range(range__)] 
  
    # Traversing the read only array and
    # updating count
    for i in range(0, n + 1, 1):
          
        # arr[i] belongs to block number
        # (arr[i]-1)/sq i is considered
        # to start from 0
        count[int((arr[i] - 1) / sq)] += 1
  
    # The selected_block is set to last
    # block by default. Rest of the blocks
    # are checked
    selected_block = range__ - 1
    for i in range(0, range__ - 1, 1):
        if (count[i] > sq):
            selected_block = i
            break
          
    # after finding block with size > sq
    # method of hashing is used to find
    # the element repeating in this block
    m = {i:0 for i in range(n)}
    for i in range(0, n + 1, 1):
          
        # checks if the element belongs 
        # to the selected_block
        if (((selected_block * sq) < arr[i]) and 
             (arr[i] <= ((selected_block + 1) * sq))):
            m[arr[i]] += 1
  
            # repeating element found
            if (m[arr[i]] > 1):
                return arr[i]
  
    # return -1 if no repeating element exists
    return -1
  
# Driver Code
if __name__ == '__main__':
      
    # read only array, not to be modified
    arr = [1, 1, 2, 3, 5, 4]
  
    # array of size 6(n + 1) having
    # elements between 1 and 5
    n = 5
  
    print("One of the numbers repeated in the array is:",
                             findRepeatingNumber(arr, n))
      
# This code is contributed by
# Sahil_shelangia
 
 

C#




// C# program to find one of the repeating 
// elements in a read only array 
using System;
using System.Collections.Generic;
  
class GFG
{
  
    // Function to find one of the repeating 
    // elements 
    static int findRepeatingNumber(int[] arr, int n)
    {
        // Size of blocks except the 
        // last block is sq 
        int sq = (int) Math.Sqrt(n);
  
        // Number of blocks to incorporate 1 to 
        // n values blocks are numbered from 0 
        // to range-1 (both included) 
        int range = (n / sq) + 1;
  
        // Count array maintains the count for 
        // all blocks 
        int[] count = new int[range];
  
        // Traversing the read only array and 
        // updating count 
        for (int i = 0; i <= n; i++)
        {
            // arr[i] belongs to block number 
            // (arr[i]-1)/sq i is considered 
            // to start from 0 
            count[(arr[i] - 1) / sq]++;
        }
  
        // The selected_block is set to last 
        // block by default. Rest of the blocks 
        // are checked 
        int selected_block = range - 1;
        for (int i = 0; i < range - 1; i++) 
        { 
            if (count[i] > sq) 
            { 
                selected_block = i; 
                break; 
            } 
        }
  
        // after finding block with size > sq 
        // method of hashing is used to find 
        // the element repeating in this block 
        Dictionary<int,int> m = new Dictionary<int,int>();
        for (int i = 0; i <= n; i++)
        {
            // checks if the element belongs to the 
            // selected_block 
            if ( ((selected_block * sq) < arr[i]) && 
                    (arr[i] <= ((selected_block + 1) * sq))) 
            { 
                m.Add(arr[i], 1);
  
                // repeating element found
                if (m[arr[i]] == 1) 
                    return arr[i]; 
            } 
        }
  
        // return -1 if no repeating element exists 
        return -1; 
    }
  
// Driver code
public static void Main(String []args)
{
    // read only array, not to be modified 
    int[] arr = { 1, 1, 2, 3, 5, 4 };
  
    // array of size 6(n + 1) having 
    // elements between 1 and 5 
    int n = 5;
  
    Console.WriteLine("One of the numbers repeated in the array is: " + 
                                    findRepeatingNumber(arr, n));
}
}
  
// This code contributed by Rajput-Ji
 
 

Javascript




<script>
  
// JavaScript program to find one of the repeating
// elements in a read only array
  
  
// Function to find one of the repeating
// elements
function findRepeatingNumber(arr, n) {
    // Size of blocks except the
    // last block is sq
    let sq = Math.sqrt(n);
  
    // Number of blocks to incorporate 1 to
    // n values blocks are numbered from 0
    // to range-1 (both included)
    let range = Math.floor(n / sq) + 1;
  
    // Count array maintains the count for
    // all blocks
    let count = new Array(range).fill(0);
  
    // Traversing the read only array and
    // updating count
    for (let i = 0; i <= n; i++) {
        // arr[i] belongs to block number
        // (arr[i]-1)/sq i is considered
        // to start from 0
        count[(Math.floor((arr[i] - 1) / sq))]++;
    }
  
    // The selected_block is set to last
    // block by default. Rest of the blocks
    // are checked
    let selected_block = range - 1;
    for (let i = 0; i < range - 1; i++) {
        if (count[i] > sq) {
            selected_block = i;
            break;
        }
    }
  
    // after finding block with size > sq
    // method of hashing is used to find
    // the element repeating in this block
    let m = new Map();
    for (let i = 0; i <= n; i++) {
        // checks if the element belongs to the
        // selected_block
        if (((selected_block * sq) < arr[i]) &&
            (arr[i] <= ((selected_block + 1) * sq))) {
            m[arr[i]]++;
  
            if (m.has(arr[i])) {
                m.set(arr[i], m.get(arr[i]) + 1)
            } else {
                m.set(arr[i], 1)
            }
  
            // repeating element found
            if (m.get(arr[i]) > 1)
                return arr[i];
        }
    }
  
    // return -1 if no repeating element exists
    return -1;
}
  
// Driver Program
  
// read only array, not to be modified
const arr = [1, 1, 2, 3, 5, 4];
  
// array of size 6(n + 1) having
// elements between 1 and 5
let n = 5;
  
document.write("One of the numbers repeated in"
    + " the array is: "
    + findRepeatingNumber(arr, n) + "<br>");
      
</script>
 
 
Output
One of the numbers repeated in the array is: 1

Time Complexity: O(N) 
Auxiliary Space: sqrt(N)

 



Next Article
Find the two repeating elements in a given array
https://media.geeksforgeeks.org/auth/avatar.png
GeeksforGeeks
Improve
Article Tags :
  • Arrays
  • Competitive Programming
  • DSA
  • Hash
  • cpp-unordered_map
Practice Tags :
  • Arrays
  • Hash

Similar Reads

  • Find the only non-repeating element in a given array
    Given an array A[] consisting of N (1 ? N ? 105) positive integers, the task is to find the only array element with a single occurrence. Note: It is guaranteed that only one such element exists in the array. Examples: Input: A[] = {1, 1, 2, 3, 3}Output: 2Explanation: Distinct array elements are {1,
    11 min read
  • Find the only repeating element in a sorted array of size n
    Given a sorted array of n elements containing elements in range from 1 to n-1 i.e. one element occurs twice, the task is to find the repeating element in an array. Examples : Input : arr[] = { 1, 2 , 3 , 4 , 4}Output : 4Input : arr[] = { 1 , 1 , 2 , 3 , 4}Output : 1Brute Force: Traverse the input ar
    8 min read
  • Find the first repeating element in an array of integers
    Given an array of integers arr[], The task is to find the index of first repeating element in it i.e. the element that occurs more than once and whose index of the first occurrence is the smallest. Examples: Input: arr[] = {10, 5, 3, 4, 3, 5, 6}Output: 5 Explanation: 5 is the first element that repe
    8 min read
  • Find the two repeating elements in a given array
    Given an array arr[] of N+2 elements. All elements of the array are in the range of 1 to N. And all elements occur once except two numbers which occur twice. Find the two repeating numbers. Examples: Input: arr = [4, 2, 4, 5, 2, 3, 1], N = 5Output: 4 2Explanation: The above array has n + 2 = 7 eleme
    15+ min read
  • Minimize removal from Array so that in any pair one element is multiple of other
    Given an array arr[] of size N, the task is to count the minimum number of elements required to be removed from the given array such that whenever any pair (arr[i], arr[j]) is picked, where i != j and 0 ≤ i < j < N, either arr[i] is multiple of arr[j] or vice versa. Examples: Input: N = 5, arr
    9 min read
  • Find first non-repeating element in a given Array of integers
    Given an array of integers of size N, the task is to find the first non-repeating element in this array. Examples: Input: {-1, 2, -1, 3, 0}Output: 2Explanation: The first number that does not repeat is : 2 Input: {9, 4, 9, 6, 7, 4}Output: 6 Recommended ProblemNon-Repeating ElementSolve Problem Simpl
    9 min read
  • Non-Repeating Elements of a given array using Multithreaded program
    Given an array arr[] of size N and an integer T representing the count of threads, the task is to find all non-repeating array elements using multithreading. Examples: Input: arr[] = { 1, 0, 5, 5, 2}, T = 3 Output: 0 1 2 Explanation: The frequency of 0 in the array arr[] is 1. The frequency of 1 in
    13 min read
  • Find sum of non-repeating (distinct) elements in an array
    Given an integer array with repeated elements, the task is to find the sum of all distinct elements in the array.Examples: Input : arr[] = {12, 10, 9, 45, 2, 10, 10, 45,10};Output : 78Here we take 12, 10, 9, 45, 2 for sumbecause it's distinct elements Input : arr[] = {1, 10, 9, 4, 2, 10, 10, 45 , 4}
    14 min read
  • Find index of an extra element present in one sorted array
    Given two sorted arrays. There is only 1 difference between the arrays. The first array has one element extra added in between. Find the index of the extra element. Examples: Input: {2, 4, 6, 8, 9, 10, 12}; {2, 4, 6, 8, 10, 12}; Output: 4 Explanation: The first array has an extra element 9. The extr
    15+ min read
  • Elements that occurred only once in the array
    Given an array arr that has numbers appearing twice or once. The task is to identify numbers that occur only once in the array. Note: Duplicates appear side by side every time. There might be a few numbers that can occur at one time and just assume this is a right rotating array (just say an array c
    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