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
  • Natural Numbers
  • Whole Numbers
  • Real Numbers
  • Integers
  • Rational Numbers
  • Irrational Numbers
  • Complex Numbers
  • Prime Numbers
  • Odd Numbers
  • Even Numbers
  • Properties of Numbers
  • Number System
Open In App
Next Article:
Palindrome Partitioning
Next article icon

Next higher palindromic number using the same set of digits

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

Given a palindromic number num having n number of digits. The problem is to find the smallest palindromic number greater than num using the same set of digits as in num. If no such number can be formed then print "Not Possible". 
The number could be very large and may or may not even fit into long long int.

Examples: 

Input : 4697557964
Output :  4756996574

Input : 543212345
Output : Not Possible

Approach:  

Follow the below steps to solve the problem:

  1. If number of digits n <= 3, then print "Not Possible" and return.
  2. Calculate mid = n/2 - 1.
  3. Start traversing from the digit at index mid up to the 1st digit and while traversing find the index i of the rightmost digit which is smaller than the digit on its right side.
  4. Now search for the smallest digit greater than the digit num[i] in the index range i+1 to mid. Let the index of this digit be smallest.
  5. If no such smallest digit found, then print "Not Possible".
  6. Else the swap the digits at index i and smallest and also swap the digits at index n-i-1 and n-smallest-1. This step is done so as to maintain the palindromic property in num.
  7. Now reverse the digits in the index range i+1 to mid. Also If n is even then reverse the digits in the index range mid+1 to n-i-2 else if n is odd then reverse the digits in the index range mid+2 to n-i-2. This step is done so as to maintain the palindromic property in num.
  8. Print the final modified number num.

Implementation:

C++
// C++ implementation to find next higher  // palindromic number using the same set  // of digits #include <bits/stdc++.h> using namespace std;  // function to reverse the digits in the // range i to j in 'num' void reverse(char num[], int i, int j) {     while (i < j) {         swap(num[i], num[j]);         i++;         j--;     } }  // function to find next higher palindromic // number using the same set of digits void nextPalin(char num[], int n) {     // if length of number is less than '3'     // then no higher palindromic number     // can be formed     if (n <= 3) {         cout << "Not Possible";         return;     }      // find the index of last digit     // in the 1st half of 'num'     int mid = n / 2 - 1;     int i, j;      // Start from the (mid-1)th digit and     // find the first digit that is     // smaller than the digit next to it.     for (i = mid - 1; i >= 0; i--)         if (num[i] < num[i + 1])             break;      // If no such digit is found, then all     // digits are in descending order which      // means there cannot be a greater      // palindromic number with same set of      // digits     if (i < 0) {         cout << "Not Possible";         return;     }      // Find the smallest digit on right     // side of ith digit which is greater      // than num[i] up to index 'mid'     int smallest = i + 1;     for (j = i + 2; j <= mid; j++)         if (num[j] > num[i] &&              num[j] <= num[smallest])             smallest = j;      // swap num[i] with num[smallest]     swap(num[i], num[smallest]);      // as the number is a palindrome, the same     // swap of digits should be performed in     // the 2nd half of 'num'     swap(num[n - i - 1], num[n - smallest - 1]);      // reverse digits in the range (i+1) to mid     reverse(num, i + 1, mid);      // if n is even, then reverse digits in the     // range mid+1 to n-i-2     if (n % 2 == 0)         reverse(num, mid + 1, n - i - 2);      // else if n is odd, then reverse digits     // in the range mid+2 to n-i-2     else         reverse(num, mid + 2, n - i - 2);      // required next higher palindromic number     cout << "Next Palindrome: "          << num; }  // Driver program to test above int main() {     char num[] = "4697557964";     int n = strlen(num);     nextPalin(num, n);     return 0; } 
C
// C implementation to find next higher // palindromic number using the same set // of digits  #include <stdio.h> #include <string.h>  // function to reverse the digits in the // range i to j in 'num' void reverse(char num[], int i, int j) {     while (i < j) {         char temp = num[i];         num[i] = num[j];         num[j] = temp;         i++;         j--;     } }  // function to find next higher palindromic // number using the same set of digits void nextPalin(char num[], int n) {     // if length of number is less than '3'     // then no higher palindromic number     // can be formed     if (n <= 3) {         printf("Not Possible");         return;     }      // find the index of last digit     // in the 1st half of 'num'     int mid = n / 2 - 1;     int i, j;      // Start from the (mid-1)th digit and     // find the first digit that is     // smaller than the digit next to it.     for (i = mid - 1; i >= 0; i--)         if (num[i] < num[i + 1])             break;      // If no such digit is found, then all     // digits are in descending order which     // means there cannot be a greater     // palindromic number with same set of     // digits     if (i < 0) {         printf("Not Possible");         return;     }      // Find the smallest digit on right     // side of ith digit which is greater     // than num[i] up to index 'mid'     int smallest = i + 1;     for (j = i + 2; j <= mid; j++)         if (num[j] > num[i] && num[j] <= num[smallest])             smallest = j;      // swap num[i] with num[smallest]     char temp = num[i];     num[i] = num[smallest];     num[smallest] = temp;      // as the number is a palindrome, the same     // swap of digits should be performed in     // the 2nd half of 'num'     temp = num[n - i - 1];     num[n - i - 1] = num[n - smallest - 1];     num[n - smallest - 1] = temp;      // reverse digits in the range (i+1) to mid     reverse(num, i + 1, mid);      // if n is even, then reverse digits in the     // range mid+1 to n-i-2     if (n % 2 == 0)         reverse(num, mid + 1, n - i - 2);      // else if n is odd, then reverse digits     // in the range mid+2 to n-i-2     else         reverse(num, mid + 2, n - i - 2);      // required next higher palindromic number     printf("Next Palindrome: %s", num); }  // Driver program to test above int main() {     char num[] = "4697557964";     int n = strlen(num);     nextPalin(num, n);     return 0; } 
Java
// Java implementation to find next higher  // palindromic number using the same set  // of digits import java.util.*;  class NextHigherPalindrome {     // function to reverse the digits in the     // range i to j in 'num'     public static void reverse(char num[], int i,                                            int j)     {         while (i < j) {             char temp = num[i];             num[i] = num[j];             num[j] = temp;             i++;             j--;         }     }          // function to find next higher palindromic     // number using the same set of digits     public static void nextPalin(char num[], int n)     {         // if length of number is less than '3'         // then no higher palindromic number         // can be formed         if (n <= 3) {             System.out.println("Not Possible");             return;         }         char temp;                  // find the index of last digit         // in the 1st half of 'num'         int mid = n / 2 - 1;         int i, j;              // Start from the (mid-1)th digit and         // find the first digit that is         // smaller than the digit next to it.         for (i = mid - 1; i >= 0; i--)             if (num[i] < num[i + 1])                 break;              // If no such digit is found, then all         // digits are in descending order which          // means there cannot be a greater          // palindromic number with same set of          // digits         if (i < 0) {             System.out.println("Not Possible");             return;         }              // Find the smallest digit on right         // side of ith digit which is greater          // than num[i] up to index 'mid'         int smallest = i + 1;         for (j = i + 2; j <= mid; j++)             if (num[j] > num[i] &&                  num[j] <= num[smallest])                 smallest = j;              // swap num[i] with num[smallest]         temp = num[i];         num[i] = num[smallest];         num[smallest] = temp;                  // as the number is a palindrome,          // the same swap of digits should         // be performed in the 2nd half of         // 'num'         temp = num[n - i - 1];         num[n - i - 1] = num[n - smallest - 1];         num[n - smallest - 1] = temp;                  // reverse digits in the range (i+1)          // to mid         reverse(num, i + 1, mid);              // if n is even, then reverse         // digits in the range mid+1 to          // n-i-2         if (n % 2 == 0)             reverse(num, mid + 1, n - i - 2);              // else if n is odd, then reverse          // digits in the range mid+2 to n-i-2         else             reverse(num, mid + 2, n - i - 2);              // required next higher palindromic          // number         String result=String.valueOf(num);         System.out.println("Next Palindrome: "+                                     result);     }          // Driver Code     public static void main(String args[])     {         String str="4697557964";         char num[]=str.toCharArray();         int n=str.length();         nextPalin(num,n);     } }  // This code is contributed by Danish Kaleem 
Python
# Python implementation to find next higher  # palindromic number using the same set  # of digits  # function to reverse the digits in the # range i to j in 'num' def reverse(num, i, j) :          while (i < j) :         temp = num[i]         num[i] = num[j]         num[j] = temp         i = i + 1         j = j - 1               # function to find next higher palindromic # number using the same set of digits def nextPalin(num, n) :          # if length of number is less than '3'     # then no higher palindromic number     # can be formed     if (n <= 3) :         print "Not Possible"         return          # find the index of last digit     # in the 1st half of 'num'     mid = n / 2 - 1          # Start from the (mid-1)th digit and     # find the first digit that is     # smaller than the digit next to it.     i = mid - 1     while i >= 0 :         if (num[i] < num[i + 1]) :             break         i = i - 1          # If no such digit is found, then all     # digits are in descending order which      # means there cannot be a greater      # palindromic number with same set of      # digits     if (i < 0) :         print "Not Possible"         return          # Find the smallest digit on right     # side of ith digit which is greater      # than num[i] up to index 'mid'     smallest = i + 1     j = i + 2     while j <= mid :         if (num[j] > num[i] and num[j] <                          num[smallest]) :             smallest = j         j = j + 1          # swap num[i] with num[smallest]     temp = num[i]     num[i] = num[smallest]     num[smallest] = temp          # as the number is a palindrome,      # the same swap of digits should     # be performed in the 2nd half of     # 'num'     temp = num[n - i - 1]     num[n - i - 1] = num[n - smallest - 1]     num[n - smallest - 1] = temp          # reverse digits in the range (i+1)      # to mid     reverse(num, i + 1, mid)          # if n is even, then reverse     # digits in the range mid+1 to      # n-i-2     if (n % 2 == 0) :         reverse(num, mid + 1, n - i - 2)              # else if n is odd, then reverse      # digits in the range mid+2 to n-i-2     else :         reverse(num, mid + 2, n - i - 2)                       # required next higher palindromic      # number     result = ''.join(num)          print "Next Palindrome: ",result      # Driver Code st = "4697557964" num = list(st) n = len(st) nextPalin(num, n)  # This code is contributed by Nikita Tiwari 
C#
// C# implementation to find  // next higher palindromic  // number using the same set  // of digits using System;  class GFG {     // function to reverse      // the digits in the     // range i to j in 'num'     public static void reverse(char[] num,                                 int i, int j)     {         while (i < j)         {             char temp = num[i];             num[i] = num[j];             num[j] = temp;             i++;             j--;         }     }          // function to find next      // higher palindromic number     // using the same set of digits     public static void nextPalin(char[] num,                                   int n)     {         // if length of number is         // less than '3' then no         // higher palindromic number         // can be formed         if (n <= 3)         {             Console.WriteLine("Not Possible");             return;         }         char temp;                  // find the index of last          // digit in the 1st half         // of 'num'         int mid = n / 2 - 1;         int i, j;              // Start from the (mid-1)th          // digit and find the          // first digit that is         // smaller than the digit         // next to it.         for (i = mid - 1; i >= 0; i--)             if (num[i] < num[i + 1])                 break;              // If no such digit is found,          // then all digits are in          // descending order which          // means there cannot be a          // greater palindromic number          // with same set of digits         if (i < 0)         {             Console.WriteLine("Not Possible");             return;         }              // Find the smallest digit on          // right side of ith digit           // which is greater than num[i]         // up to index 'mid'         int smallest = i + 1;         for (j = i + 2; j <= mid; j++)             if (num[j] > num[i] &&                  num[j] < num[smallest])                 smallest = j;              // swap num[i] with         // num[smallest]         temp = num[i];         num[i] = num[smallest];         num[smallest] = temp;                  // as the number is a palindrome,          // the same swap of digits should         // be performed in the 2nd half of         // 'num'         temp = num[n - i - 1];         num[n - i - 1] = num[n - smallest - 1];         num[n - smallest - 1] = temp;                  // reverse digits in the           // range (i+1) to mid         reverse(num, i + 1, mid);              // if n is even, then         // reverse digits in the          // range mid+1 to n-i-2         if (n % 2 == 0)             reverse(num, mid + 1,                     n - i - 2);              // else if n is odd, then          // reverse digits in the          // range mid+2 to n-i-2         else             reverse(num, mid + 2,                      n - i - 2);              // required next higher          // palindromic number         String result = new String(num);         Console.WriteLine("Next Palindrome: "+                                        result);     }          // Driver Code     public static void Main()     {         String str = "4697557964";         char[] num = str.ToCharArray();         int n = str.Length;         nextPalin(num, n);     } }  // This code is contributed by mits 
JavaScript
<script>  // Javascript implementation to find next higher  // palindromic number using the same set  // of digitsclass NextHigherPalindrome  // Function to reverse the digits in the // range i to j in 'num' function reverse(num , i, j) {     while (i < j)      {         var temp = num[i];         num[i] = num[j];         num[j] = temp;         i++;         j--;     } }  // Function to find next higher palindromic // number using the same set of digits function nextPalin(num, n) {          // If length of number is less than '3'     // then no higher palindromic number     // can be formed     if (n <= 3)      {         document.write("Not Possible");         return;     }     var temp;          // Find the index of last digit     // in the 1st half of 'num'     var mid = n / 2 - 1;     var i, j;      // Start from the (mid-1)th digit and     // find the first digit that is     // smaller than the digit next to it.     for(i = mid - 1; i >= 0; i--)         if (num[i] < num[i + 1])             break;      // If no such digit is found, then all     // digits are in descending order which      // means there cannot be a greater      // palindromic number with same set of      // digits     if (i < 0)     {         document.write("Not Possible");         return;     }      // Find the smallest digit on right     // side of ith digit which is greater      // than num[i] up to index 'mid'     var smallest = i + 1;     for(j = i + 2; j <= mid; j++)         if (num[j] > num[i] &&              num[j] <= num[smallest])             smallest = j;      // Swap num[i] with num[smallest]     temp = num[i];     num[i] = num[smallest];     num[smallest] = temp;          // As the number is a palindrome,      // the same swap of digits should     // be performed in the 2nd half of     // 'num'     temp = num[n - i - 1];     num[n - i - 1] = num[n - smallest - 1];     num[n - smallest - 1] = temp;          // Reverse digits in the range (i+1)      // to mid     reverse(num, i + 1, mid);      // If n is even, then reverse     // digits in the range mid+1 to      // n-i-2     if (n % 2 == 0)         reverse(num, mid + 1, n - i - 2);      // Else if n is odd, then reverse      // digits in the range mid+2 to n-i-2     else         reverse(num, mid + 2, n - i - 2);      // Required next higher palindromic      // number     var result = num.join('');     document.write("Next Palindrome: "+                     result); }  // Driver Code var str = "4697557964"; var num = str.split(''); var n = str.length;  nextPalin(num,n);  // This code is contributed by 29AjayKumar   </script> 
PHP
<?php // PHP implementation to find  // next higher palindromic number  // using the same set of digits  // function to reverse the digits  // in the range i to j in 'num' function reverse(&$num, $i, $j) {     while ($i < $j)      {         $t = $num[$i];         $num[$i] = $num[$j];         $num[$j] = $t;         $i++;         $j--;     } }  // function to find next higher  // palindromic number using the // same set of digits function nextPalin($num, $n) {     // if length of number is less      // than '3' then no higher      // palindromic number can be formed     if ($n <= 3)      {         echo "Not Possible";         return;     }      // find the index of last digit     // in the 1st half of 'num'     $mid = ($n / 2) - 1;     $i = $mid - 1;     $j;      // Start from the (mid-1)th digit      // and find the first digit      // that is smaller than the digit      // next to it.     for (; $i >= 0; $i--)         if ($num[$i] < $num[$i + 1])             break;      // If no such digit is found,      // then all digits are in      // descending order which means      // there cannot be a greater      // palindromic number with same      // set of digits     if ($i < 0)     {         echo "Not Possible";         return;     }      // Find the smallest digit on right     // side of ith digit which is greater      // than num[i] up to index 'mid'     $smallest = $i + 1;     $j = 0;     for ($j = $i + 2; $j <= $mid; $j++)         if ($num[$j] > $num[$i] &&              $num[$j] < $num[$smallest])             $smallest = $j;      // swap num[i] with num[smallest]     $t = $num[$i];     $num[$i] = $num[$smallest];     $num[$smallest] = $t;          // as the number is a palindrome,     // the same swap of digits should     // be performed in the 2nd half of 'num'     $t = $num[$n - $i - 1];     $num[$n - $i - 1] = $num[$n - $smallest - 1];     $num[$n - $smallest - 1] = $t;      // reverse digits in the     // range (i+1) to mid     reverse($num, $i + 1, $mid);      // if n is even, then     // reverse digits in the     // range mid+1 to n-i-2     if ($n % 2 == 0)         reverse($num, $mid + 1, $n - $i - 2);      // else if n is odd, then reverse      // digits in the range mid+2      // to n-i-2     else         reverse($num, $mid + 2, $n - $i - 2);      // required next higher     // palindromic number     echo "Next Palindrome: " . $num; }  // Driver Code $num = "4697557964"; $n = strlen($num); nextPalin($num, $n);  // This code is contributed by mits ?> 

Output
Next Palindrome: 4756996574

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


Next Article
Palindrome Partitioning

A

Ayush Jauhari
Improve
Article Tags :
  • Misc
  • Strings
  • Mathematical
  • DSA
  • palindrome
  • number-digits
  • Numbers
Practice Tags :
  • Mathematical
  • Misc
  • Numbers
  • palindrome
  • Strings

Similar Reads

  • Palindrome String Coding Problems
    A string is called a palindrome if the reverse of the string is the same as the original one. Example: “madam”, “racecar”, “12321”. Properties of a Palindrome String:A palindrome string has some properties which are mentioned below: A palindrome string has a symmetric structure which means that the
    2 min read
  • Palindrome String
    Given a string s, the task is to check if it is palindrome or not. Example: Input: s = "abba"Output: 1Explanation: s is a palindrome Input: s = "abc" Output: 0Explanation: s is not a palindrome Using Two-Pointers - O(n) time and O(1) spaceThe idea is to keep two pointers, one at the beginning (left)
    14 min read
  • Check Palindrome by Different Language

    • Palindrome Number Program in C
      Write a C program to check whether a given number is a palindrome or not. Palindrome numbers are those numbers which after reversing the digits equals the original number. Examples Input: 121Output: YesExplanation: The number 121 remains the same when its digits are reversed. Input: 123Output: NoExp
      4 min read

    • C Program to Check for Palindrome String
      A string is said to be palindrome if the reverse of the string is the same as the string. In this article, we will learn how to check whether the given string is palindrome or not using C program. The simplest method to check for palindrome string is to reverse the given string and store it in a tem
      4 min read

    • C++ Program to Check if a Given String is Palindrome or Not
      A string is said to be palindrome if the reverse of the string is the same as the original string. In this article, we will check whether the given string is palindrome or not in C++. Examples Input: str = "ABCDCBA"Output: "ABCDCBA" is palindromeExplanation: Reverse of the string str is "ABCDCBA". S
      4 min read

    • Java Program to Check Whether a String is a Palindrome
      A string in Java can be called a palindrome if we read it from forward or backward, it appears the same or in other words, we can say if we reverse a string and it is identical to the original string for example we have a string s = "jahaj " and when we reverse it s = "jahaj"(reversed) so they look
      8 min read

    Easy Problems on Palindrome

    • Sentence Palindrome
      Given a sentence s, the task is to check if it is a palindrome sentence or not. A palindrome sentence is a sequence of characters, such as a word, phrase, or series of symbols, that reads the same backward as forward after converting all uppercase letters to lowercase and removing all non-alphanumer
      9 min read
    • Check if actual binary representation of a number is palindrome
      Given a non-negative integer n. The problem is to check if binary representation of n is palindrome or not. Note that the actual binary representation of the number is being considered for palindrome checking, no leading 0’s are being considered. Examples : Input : 9 Output : Yes (9)10 = (1001)2 Inp
      6 min read
    • Print longest palindrome word in a sentence
      Given a string str, the task is to print longest palindrome word present in the string str.Examples: Input : Madam Arora teaches Malayalam Output: Malayalam Explanation: The string contains three palindrome words (i.e., Madam, Arora, Malayalam) but the length of Malayalam is greater than the other t
      14 min read
    • Count palindrome words in a sentence
      Given a string str and the task is to count palindrome words present in the string str. Examples: Input : Madam Arora teaches malayalam Output : 3 The string contains three palindrome words (i.e., Madam, Arora, malayalam) so the count is three. Input : Nitin speaks malayalam Output : 2 The string co
      5 min read
    • Check if characters of a given string can be rearranged to form a palindrome
      Given a string, Check if the characters of the given string can be rearranged to form a palindrome. For example characters of "geeksogeeks" can be rearranged to form a palindrome "geeksoskeeg", but characters of "geeksforgeeks" cannot be rearranged to form a palindrome. Recommended PracticeAnagram P
      14 min read
    • Lexicographically first palindromic string
      Rearrange the characters of the given string to form a lexicographically first palindromic string. If no such string exists display message "no palindromic string". Examples: Input : malayalam Output : aalmymlaa Input : apple Output : no palindromic string Simple Approach: 1. Sort the string charact
      13 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