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
  • Practice Pattern Searching
  • Tutorial on Pattern Searching
  • Naive Pattern Searching
  • Rabin Karp
  • KMP Algorithm
  • Z Algorithm
  • Trie for Pattern Seaching
  • Manacher Algorithm
  • Suffix Tree
  • Ukkonen's Suffix Tree Construction
  • Boyer Moore
  • Aho-Corasick Algorithm
  • Wildcard Pattern Matching
Open In App
Next Article:
Palindrome Substring Queries
Next article icon

Online algorithm for checking palindrome in a stream

Last Updated : 11 Feb, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Given a stream of characters (characters are received one by one), write a function that prints ‘Yes’ if a character makes the complete string palindrome, else prints ‘No’. 

Examples:

Input: str[] = "abcba"
Output: a Yes // "a" is palindrome
b No // "ab" is not palindrome
c No // "abc" is not palindrome
b No // "abcb" is not palindrome
a Yes // "abcba" is palindrome
Input: str[] = "aabaacaabaa"
Output: a Yes // "a" is palindrome
a Yes // "aa" is palindrome
b No // "aab" is not palindrome
a No // "aaba" is not palindrome
a Yes // "aabaa" is palindrome
c No // "aabaac" is not palindrome
a No // "aabaaca" is not palindrome
a No // "aabaacaa" is not palindrome
b No // "aabaacaab" is not palindrome
a No // "aabaacaaba" is not palindrome
a Yes // "aabaacaabaa" is palindrome

Let input string be str[0..n-1]. 

A Simple Solution is to do following for every character str[i] in input string. Check if substring str[0…i] is palindrome, then print yes, else print no. 

A Better Solution is to use the idea of Rolling Hash used in Rabin Karp algorithm. The idea is to keep track of reverse of first half and second half (we also use first half and reverse of second half) for every index. Below is complete algorithm.

  1) The first character is always a palindrome, so print yes for 
first character.
2) Initialize reverse of first half as "a" and second half as "b".
Let the hash value of first half reverse be 'firstr' and that of
second half be 'second'.
3) Iterate through string starting from second character, do following
for every character str[i], i.e., i varies from 1 to n-1.
a) If 'firstr' and 'second' are same, then character by character
check the substring ending with current character and print
"Yes" if palindrome.
Note that if hash values match, then strings need not be same.
For example, hash values of "ab" and "ba" are same, but strings
are different. That is why we check complete string after hash.
b) Update 'firstr' and 'second' for next iteration.
If 'i' is even, then add next character to the beginning of
'firstr' and end of second half and update
hash values.
If 'i' is odd, then keep 'firstr' as it is, remove leading
character from second and append a next
character at end.

Let us see all steps for example 

string “abcba” Initial values of ‘firstr’ and ‘second’      

firstr’ = hash(“a”), ‘second’ = hash(“b”) Start from second character, i.e., i = 1      

  • Compare ‘firstr’ and ‘second’, they don’t match, so print no.     
  • Calculate hash values for next iteration, i.e., i = 2      

Since i is odd, ‘firstr’ is not changed and ‘second’ becomes hash(“c”) i = 2      

  • Compare ‘firstr’ and ‘second’, they don’t match, so print no.     
  • Calculate hash values for next iteration, i.e., i = 3      

Since i is even, ‘firstr’ becomes hash(“ba”) and ‘second’ becomes hash(“cb”) i = 3      

  • Compare ‘first’ and ‘second’, they don’t match, so print no.      
  • Calculate hash values for next iteration, i.e., i = 4      

Since i is odd, ‘firstr’ is not changed and ‘second’ becomes hash(“ba”) i = 4     

  • ‘firstr’ and ‘second’ match, compare the whole strings, they match, so print yes      
  • We don’t need to calculate next hash values as this is last index The idea of using rolling hashes is, next hash value can be calculated from previous in O(1) time by just doing some constant number of arithmetic operations. Below are the implementations of above approach. 
C++
// C++ program for online algorithm for palindrome checking #include<bits/stdc++.h> using namespace std;     // d is the number of characters in input alphabet #define d 256     // q is a prime number used for evaluating Rabin Karp's Rolling hash #define q 103     void checkPalindromes(string str) {     // Length of input string     int N = str.size();         // A single character is always a palindrome     cout << str[0] << " Yes" << endl;         // Return if string has only one character     if (N == 1) return;         // Initialize first half reverse and second half for      // as firstr and second characters     int firstr  = str[0] % q;     int second = str[1] % q;         int h = 1, i, j;         // Now check for palindromes from second character     // onward     for (i=1; i<N; i++)     {         // If the hash values of 'firstr' and 'second'          // match, then only check individual characters         if (firstr == second)         {             /* Check if str[0..i] is palindrome using                simple character by character match */             for (j = 0; j < i/2; j++)             {                 if (str[j] != str[i-j])                     break;             }             (j == i/2)?  cout << str[i] << " Yes" << endl: cout << str[i] << " No" << endl;         }         else cout << str[i] << " No" << endl;             // Calculate hash values for next iteration.         // Don't calculate hash for next characters if         // this is the last character of string         if (i != N-1)         {             // If i is even (next i is odd)              if (i%2 == 0)             {                 // Add next character after first half at beginning                  // of 'firstr'                 h = (h*d) % q;                 firstr  = (firstr + h*str[i/2])%q;                                     // Add next character after second half at the end                 // of second half.                 second = (second*d + str[i+1])%q;             }             else             {                 // If next i is odd (next i is even) then we                 // need not to change firstr, we need to remove                 // first character of second and append a                 // character to it.                 second = (d*(second + q - str[(i+1)/2]*h)%q                           + str[i+1])%q;             }         }     } }     /* Driver program to test above function */ int main() {     string txt = "aabaacaabaa";     checkPalindromes(txt);     return 0; }  // The code is contributed by Nidhi goel.  
C
// C program for online algorithm for palindrome checking  #include<stdio.h>  #include<string.h>     // d is the number of characters in input alphabet  #define d 256     // q is a prime number used for evaluating Rabin Karp's Rolling hash  #define q 103     void checkPalindromes(char str[])  {      // Length of input string      int N = strlen(str);         // A single character is always a palindrome      printf("%c Yes\n", str[0]);         // Return if string has only one character      if (N == 1) return;         // Initialize first half reverse and second half for       // as firstr and second characters      int firstr  = str[0] % q;      int second = str[1] % q;         int h = 1, i, j;         // Now check for palindromes from second character      // onward      for (i=1; i<N; i++)      {          // If the hash values of 'firstr' and 'second'           // match, then only check individual characters          if (firstr == second)          {              /* Check if str[0..i] is palindrome using                 simple character by character match */             for (j = 0; j < i/2; j++)              {                  if (str[j] != str[i-j])                      break;              }              (j == i/2)?  printf("%c Yes\n", str[i]):              printf("%c No\n", str[i]);          }          else printf("%c No\n", str[i]);             // Calculate hash values for next iteration.          // Don't calculate hash for next characters if          // this is the last character of string          if (i != N-1)          {              // If i is even (next i is odd)               if (i%2 == 0)              {                  // Add next character after first half at beginning                   // of 'firstr'                  h = (h*d) % q;                  firstr  = (firstr + h*str[i/2])%q;                                     // Add next character after second half at the end                  // of second half.                  second = (second*d + str[i+1])%q;              }              else             {                  // If next i is odd (next i is even) then we                  // need not to change firstr, we need to remove                  // first character of second and append a                  // character to it.                  second = (d*(second + q - str[(i+1)/2]*h)%q                            + str[i+1])%q;              }          }      }  }     /* Driver program to test above function */ int main()  {      char *txt = "aabaacaabaa";      checkPalindromes(txt);      getchar();      return 0;  }  
Java
// Java program for online algorithm for // palindrome checking public class GFG  {           // d is the number of characters in      // input alphabet     static final int d = 256;           // q is a prime number used for      // evaluating Rabin Karp's Rolling hash     static final int q = 103;           static void checkPalindromes(String str)     {         // Length of input string         int N = str.length();               // A single character is always a palindrome         System.out.println(str.charAt(0)+" Yes");               // Return if string has only one character         if (N == 1) return;               // Initialize first half reverse and second          // half for as firstr and second characters         int firstr  = str.charAt(0) % q;         int second = str.charAt(1) % q;               int h = 1, i, j;               // Now check for palindromes from second          // character onward         for (i = 1; i < N; i++)         {             // If the hash values of 'firstr' and             // 'second' match, then only check              // individual characters             if (firstr == second)             {                 /* Check if str[0..i] is palindrome                 using simple character by character                   match */                 for (j = 0; j < i/2; j++)                 {                     if (str.charAt(j) != str.charAt(i                                                 - j))                         break;                 }                 System.out.println((j == i/2) ?                    str.charAt(i) + " Yes": str.charAt(i)+                   " No");             }             else System.out.println(str.charAt(i)+ " No");                   // Calculate hash values for next iteration.             // Don't calculate hash for next characters             // if this is the last character of string             if (i != N - 1)             {                 // If i is even (next i is odd)                  if (i % 2 == 0)                 {                     // Add next character after first                      // half at beginning of 'firstr'                     h = (h * d) % q;                     firstr  = (firstr + h *str.charAt(i /                                                   2)) % q;                                           // Add next character after second                      // half at the end of second half.                     second = (second * d + str.charAt(i +                                                  1)) % q;                 }                 else                 {                     // If next i is odd (next i is even)                     // then we need not to change firstr,                     // we need to remove first character                     // of second and append a character                     // to it.                     second = (d * (second + q - str.charAt(                              (i + 1) / 2) * h) % q +                                str.charAt(i + 1)) % q;                 }             }         }     }           /* Driver program to test above function */     public static void main(String args[])     {         String txt = "aabaacaabaa";         checkPalindromes(txt);     } } // This code is contributed by Sumit Ghosh 
Python
# Python program Online algorithm for checking palindrome # in a stream  # d is the number of characters in input alphabet d = 256  # q is a prime number used for evaluating Rabin Karp's # Rolling hash q = 103  def checkPalindromes(string):      # Length of input string     N = len(string)      # A single character is always a palindrome     print string[0] + " Yes"      # Return if string has only one character     if N == 1:         return      # Initialize first half reverse and second half for     # as firstr and second characters     firstr = ord(string[0]) % q     second = ord(string[1]) % q      h = 1     i = 0     j = 0      # Now check for palindromes from second character     # onward     for i in xrange(1,N):          # If the hash values of 'firstr' and 'second'         # match, then only check individual characters         if firstr == second:              # Check if str[0..i] is palindrome using             # simple character by character match             for j in xrange(0,i/2):                 if string[j] != string[i-j]:                     break             j += 1             if j == i/2:                 print string[i] + " Yes"             else:                 print string[i] + " No"         else:             print string[i] + " No"          # Calculate hash values for next iteration.         # Don't calculate hash for next characters if         # this is the last character of string         if i != N-1:              # If i is even (next i is odd)             if i % 2 == 0:                  # Add next character after first half at                 # beginning of 'firstr'                 h = (h*d) % q                 firstr = (firstr + h*ord(string[i/2]))%q                  # Add next character after second half at                 # the end of second half.                 second = (second*d + ord(string[i+1]))%q             else:                 # If next i is odd (next i is even) then we                 # need not to change firstr, we need to remove                 # first character of second and append a                 # character to it.                 second = (d*(second + q - ord(string[(i+1)/2])*h)%q                             + ord(string[i+1]))%q  # Driver program txt = "aabaacaabaa" checkPalindromes(txt) # This code is contributed by Bhavya Jain 
C#
// C# program for online algorithm for  // palindrome checking  using System;  class GFG { // d is the number of characters   // in input alphabet  public const int d = 256;  // q is a prime number used for  // evaluating Rabin Karp's Rolling hash  public const int q = 103;  public static void checkPalindromes(string str) {     // Length of input string      int N = str.Length;      // A single character is always     // a palindrome      Console.WriteLine(str[0] + " Yes");      // Return if string has only      // one character      if (N == 1)     {         return;     }      // Initialize first half reverse and second      // half for as firstr and second characters      int firstr = str[0] % q;     int second = str[1] % q;      int h = 1, i, j;      // Now check for palindromes from      // second character onward      for (i = 1; i < N; i++)     {         // If the hash values of 'firstr'          // and 'second' match, then only          // check individual characters          if (firstr == second)         {             /* Check if str[0..i] is palindrome              using simple character by character              match */             for (j = 0; j < i / 2; j++)             {                 if (str[j] != str[i - j])                 {                     break;                 }             }             Console.WriteLine((j == i / 2) ? str[i] +                               " Yes": str[i] + " No");         }         else         {             Console.WriteLine(str[i] + " No");         }          // Calculate hash values for next iteration.          // Don't calculate hash for next characters          // if this is the last character of string          if (i != N - 1)         {             // If i is even (next i is odd)              if (i % 2 == 0)             {                 // Add next character after first                  // half at beginning of 'firstr'                  h = (h * d) % q;                 firstr = (firstr + h * str[i / 2]) % q;                  // Add next character after second                  // half at the end of second half.                  second = (second * d + str[i + 1]) % q;             }             else             {                 // If next i is odd (next i is even)                  // then we need not to change firstr,                  // we need to remove first character                  // of second and append a character                  // to it.                  second = (d * (second + q - str[(i + 1) / 2] *                                    h) % q + str[i + 1]) % q;             }         }     } }  // Driver Code public static void Main(string[] args) {     string txt = "aabaacaabaa";     checkPalindromes(txt); } }  // This code is contributed by Shrikant13 
JavaScript
// JavaScript program to check palindromic prefixes  // Function for checking palindromic prefixes function checkPalindromes(str) {     // d is the number of characters in input alphabet     var d = 256;          // q is a prime number used for evaluating Rabin-Karp's Rolling hash     var q = 103;          var n = str.length;          console.log(str.charAt(0) + " Yes");          if (n == 1) {         return;     }      // Initialize first half reverse and second half for as firstr and second characters     var firstr = str.charCodeAt(0) % q;     var second = str.charCodeAt(1) % q;      var h = 1, i, j;          // Now check for palindromes from second character onward     for (var i = 1; i < n; i++) {         // If the hash values of 'firstr' and 'second' match, then check individual characters         if (firstr === second) {             // Check if str[0..i] is palindrome using simple character-by-character match             for (j = 0; j < i / 2; j++) {                 if (str.charAt(j) !== str.charAt(i - j)) {                     break;                 }             }             console.log((j === Math.floor(i / 2)) ? str.charAt(i) + " Yes" : str.charAt(i) + " No");         } else {             console.log(str.charAt(i) + " No");         }          // Calculate hash values for the next iteration.         if (i !== n - 1) {             // If i is even (next i is odd)             if (i % 2 === 0) {                 // Add next character after first half at beginning of 'firstr'                 h = (h * d) % q;                 firstr = (firstr + h * str.charCodeAt(i / 2)) % q;                                  // Add next character after second half at the end of second half.                 second = (second * d + str.charCodeAt(i + 1)) % q;             } else {                 // If next i is odd (next i is even)                 // then we need not change firstr,                 // we need to remove first character of second and append a character to it.                 second = (d * (second + q - str.charCodeAt((i + 1) / 2) * h) % q +                           str.charCodeAt(i + 1)) % q;             }         }     } }  // Driver code var txt = "aabaacaabaa"; checkPalindromes(txt); 
PHP
<?php  // PHP program to delete elements from array.  // Function for deleting k elements function checkPalindromes($str) {     // d is the number of characters in the input alphabet     $d = 256;      // q is a prime number used for evaluating Rabin Karp's Rolling hash     $q = 103;      $n = strlen($str);      echo $str[0] . " Yes\n";      if ($n == 1) {         return;     }      // Initialize first half reverse and second     // half for as firstr and second characters     $firstr = ord($str[0]) % $q;     $second = ord($str[1]) % $q;      $h = 1;     $i = 0;     $j = 0;      // Now check for palindromes from second     // character onward     for ($i = 1; $i < $n; $i++) {         // If the hash values of 'firstr' and 'second'         // match, then only check individual characters         if ($firstr == $second) {             // Check if str[0..i] is palindrome             // using simple character by character match             for ($j = 0; $j < $i / 2; $j++) {                 if ($str[$j] != $str[$i - $j]) {                     break;                 }             }              if ($j == $i / 2) {                 echo $str[$i] . " Yes\n";             } else {                 echo $str[$i] . " No\n";             }         } else {             echo $str[$i] . " No\n";         }          // Calculate hash values for the next iteration.         // Don't calculate the hash for the next characters         // if this is the last character of the string         if ($i != $n - 1) {             // If i is even (next i is odd)             if ($i % 2 == 0) {                 // Add the next character after the first                 // half at the beginning of 'firstr'                 $h = ($h * $d) % $q;                 $firstr = ($firstr + $h * ord($str[$i / 2])) % $q;                  // Add the next character after the second                 // half at the end of the second half.                 $second = ($second * $d + ord($str[$i + 1])) % $q;             } else {                 // If next i is odd (next i is even)                 // then we need not change firstr,                 // we need to remove the first character                 // of the second and append a character to it.                 $second = ($d * ($second + $q - ord($str[($i + 1) / 2]) * $h) % $q                             + ord($str[$i + 1])) % $q;             }         }     } }  // Driver code $txt = "aabaacaabaa"; checkPalindromes($txt);   ?> 

Output
a Yes a Yes b No a No a Yes c No a No a No b No a No a Yes 

The worst case time complexity of the above solution remains O(n*n), but in general, it works much better than simple approach as we avoid complete substring comparison most of the time by first comparing hash values. 

The worst case occurs for input strings with all same characters like “aaaaaa”. 

Space Complexity: O(1)
The algorithm uses a fixed number of variables (which is independent of the size of the input string). Hence, the space complexity of the algorithm is O(1).



Next Article
Palindrome Substring Queries
author
kartik
Improve
Article Tags :
  • DSA
  • Pattern Searching
  • Strings
  • array-stream
  • palindrome
Practice Tags :
  • palindrome
  • Pattern Searching
  • 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