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 DP
  • Practice DP
  • MCQs on DP
  • Tutorial on Dynamic Programming
  • Optimal Substructure
  • Overlapping Subproblem
  • Memoization
  • Tabulation
  • Tabulation vs Memoization
  • 0/1 Knapsack
  • Unbounded Knapsack
  • Subset Sum
  • LCS
  • LIS
  • Coin Change
  • Word Break
  • Egg Dropping Puzzle
  • Matrix Chain Multiplication
  • Palindrome Partitioning
  • DP on Arrays
  • DP with Bitmasking
  • Digit DP
  • DP on Trees
  • DP on Graph
Open In App
Next Article:
Count permutations possible by replacing '?' characters in a Binary String
Next article icon

Count of possible distinct Binary strings after replacing "11" with "0"

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

Given a binary string str of size N containing 0 and 1 only, the task is to count all possible distinct binary strings when a substring "11" can be replaced by "0".

Examples:

Input: str = "11011"
Output: 4
Explanation: All possible combinations are "11011", "0011", "1100", "000".

Input: str = "110011100011111"
Output: 48

 

Naive Approach: The simplest idea to solve the problem is to try changing every possible substring and find out total how many distinct strings are being formed.

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

Efficient Approach: This problem can be efficiently solved by using the concept of dynamic programming with the help of the following idea:

  • Consider there are X number of groups of consecutive 1s. Find out in how many ways each of these groups can be modified by changing "11" to "0". The multiplication of all those values will be the required answer. 
  • Dynamic programming (say dp[] array) can be used to find the possible combinations of consecutive 1s. 
    • If the ith element is 0, it cannot be changed. So dp[i] = 1. 
    • If ith character is 1 it can be kept 1 in dp[i-1] ways or (i-1)th and ith character can be replaced with 0 in dp[i-2] ways. 
      So dp[i] = dp[i-1]+dp[i-2] in this case

Follow the steps mentioned below to solve the problem:

  • Iterate from i = 0 to N-1 and use the above observation to fill the dp[] array.
  • Again iterate from the starting and multiply the number of combinations of the consecutive 1s.
  • Return the multiplied value as the answer.

Below is the implementation of the above approach.

C++
// C++ code to implement above approach  #include <bits/stdc++.h> using namespace std;  // Function to return the // total different combination // possible int total_count(string s, int n) {     int ans = 1, dp[n] = { 0 };      // Base cases     if (s[0] == '1')         dp[0] = 1;      if (s[1] == '1' && s[1] == s[0]) {         dp[1] = 2;     }     else if (s[1] == '1') {         dp[1] = 1;     }      // Iterating through every index     // and storing the total     // combination of string due to     // all the adjacent 1's.     for (int i = 2; i < n; i++) {         if (s[i] == '1') {             if (s[i] == s[i - 1]) {                 if (s[i - 1] == s[i - 2]) {                     dp[i] = dp[i - 1]                             + dp[i - 2];                 }                 else {                     dp[i] = 2;                 }             }             else {                 dp[i] = 1;             }         }     }      // Total combinations possible     // by multiplying all the individual     // combinations.     for (int i = 1; i < n; i++) {         if (dp[i - 1] > dp[i]) {             ans = ans * dp[i - 1];         }     }     // Edge case     if (dp[n - 1] != 0) {         ans = ans * dp[n - 1];     }      // Returning the final value     return ans; }  // Driver code int main() {     string str = "11011";     int N;     N = str.size();      // Function call     cout << total_count(str, N);     return 0; } 
Java
// JAVA code to implement above approach import java.util.*; class GFG  {    // Function to return the   // total different combination   // possible   public static int total_count(String s, int n)   {     int ans = 1;     int dp[] = new int[n];     for (int i = 0; i < n; ++i) {       dp[i] = 0;     }      // Base cases     if (s.charAt(0) == '1')       dp[0] = 1;      if (s.charAt(1) == '1'         && s.charAt(1) == s.charAt(0)) {       dp[1] = 2;     }     else if (s.charAt(1) == '1') {       dp[1] = 1;     }      // Iterating through every index     // and storing the total     // combination of string due to     // all the adjacent 1's.     for (int i = 2; i < n; i++) {       if (s.charAt(i) == '1') {         if (s.charAt(i) == s.charAt(i - 1)) {           if (s.charAt(i - 1)               == s.charAt(i - 2)) {             dp[i] = dp[i - 1] + dp[i - 2];           }           else {             dp[i] = 2;           }         }         else {           dp[i] = 1;         }       }     }      // Total combinations possible     // by multiplying all the individual     // combinations.     for (int i = 1; i < n; i++) {       if (dp[i - 1] > dp[i]) {         ans = ans * dp[i - 1];       }     }     // Edge case     if (dp[n - 1] != 0) {       ans = ans * dp[n - 1];     }      // Returning the final value     return ans;   }    // Driver code   public static void main(String[] args)   {     String str = "11011";     int N;     N = str.length();      // Function call     System.out.print(total_count(str, N));   } }  // This code is contributed by Taranpreet 
Python3
# Python3 code to implement the above approach  # function to return the total different # combination possible def total_count(s, n):     ans = 1     dp = [0] * n      # base cases     if s[0] == "1":         dp[0] = 1     if s[1] == "1" and s[1] == s[0]:         dp[1] = 2     elif s[1] == "1":         dp[1] = 1      # iterating through every index and storing     # the total combination of strings due to all     # the adjacent 1s     for i in range(2, n):         if s[i] == "1":             if s[i] == s[i - 1]:                 if s[i - 1] == s[i - 2]:                     dp[i] = dp[i - 1] + dp[i - 2]                 else:                     dp[i] = 2             else:                 dp[i] = 1      # Total combinations possible by multiplying     # all the individual combinations     for i in range(1, n):         if dp[i - 1] > dp[i]:             ans *= dp[i - 1]      # Edge case     if dp[n - 1] != 0:         ans *= dp[n - 1]      # Returning the final value     return ans  # Driver Code string = "11011" N = len(string)  # Function Call print(total_count(string, N))  #This Code was contributed by phasing17 
C#
// C# code to implement above approach using System;  public class GFG{    // Function to return the   // total different combination   // possible   static int total_count(string s, int n)   {     int ans = 1;     int[] dp = new int[n];     for (int i = 0; i < n; ++i) {       dp[i] = 0;     }      // Base cases     if (s[0] == '1')       dp[0] = 1;      if (s[1] == '1'         && s[1] == s[0]) {       dp[1] = 2;     }     else if (s[1] == '1') {       dp[1] = 1;     }      // Iterating through every index     // and storing the total     // combination of string due to     // all the adjacent 1's.     for (int i = 2; i < n; i++) {       if (s[i] == '1') {         if (s[i] == s[i - 1]) {           if (s[i - 1]               == s[i - 2]) {             dp[i] = dp[i - 1] + dp[i - 2];           }           else {             dp[i] = 2;           }         }         else {           dp[i] = 1;         }       }     }      // Total combinations possible     // by multiplying all the individual     // combinations.     for (int i = 1; i < n; i++) {       if (dp[i - 1] > dp[i]) {         ans = ans * dp[i - 1];       }     }     // Edge case     if (dp[n - 1] != 0) {       ans = ans * dp[n - 1];     }      // Returning the final value     return ans;   }    // Driver code   static public void Main (){      string str = "11011";     int N;     N = str.Length;      // Function call     Console.Write(total_count(str, N));   } }  // This code is contributed by hrithikgarg03188. 
JavaScript
    <script>         // JavaScript code to implement above approach          // Function to return the         // total different combination         // possible         const total_count = (s, n) => {             let ans = 1, dp = new Array(n).fill(0);              // Base cases             if (s[0] == '1')                 dp[0] = 1;              if (s[1] == '1' && s[1] == s[0]) {                 dp[1] = 2;             }             else if (s[1] == '1') {                 dp[1] = 1;             }              // Iterating through every index             // and storing the total             // combination of string due to             // all the adjacent 1's.             for (let i = 2; i < n; i++) {                 if (s[i] == '1') {                     if (s[i] == s[i - 1]) {                         if (s[i - 1] == s[i - 2]) {                             dp[i] = dp[i - 1]                                 + dp[i - 2];                         }                         else {                             dp[i] = 2;                         }                     }                     else {                         dp[i] = 1;                     }                 }             }              // Total combinations possible             // by multiplying all the individual             // combinations.             for (let i = 1; i < n; i++) {                 if (dp[i - 1] > dp[i]) {                     ans = ans * dp[i - 1];                 }             }             // Edge case             if (dp[n - 1] != 0) {                 ans = ans * dp[n - 1];             }              // Returning the final value             return ans;         }          // Driver code         let str = "11011";         let N = str.length;          // Function call         document.write(total_count(str, N));      // This code is contributed by rakeshsahni      </script> 

Output
4

Time complexity: O(N)
Auxiliary Space: O(N)

Efficient approach: Using variables to optimize space complexity

The approach is same but to optimize space, we can replace the array dp with three variables to store the values for the last three positions. Since we only need the values of dp[i], dp[i-1], and dp[i-2] to calculate dp[i+1], we can use three variables instead of an entire array. This reduces the space complexity from O(n) to O(1).

Implementations Steps : 

  • Initialize variables ans, dp_0, dp_1, and dp_2 to 1, 0, 0, and 0 respectively.
  • Check the base cases where the first character of the string is 1 and set dp_0 to 1. If the second character is also 1 and is the same as the first character, set dp_1 to 2. If the second character is 1 and is different from the first character, set dp_1 to 1.
  • Iterate through the string starting from the third character. For each character, check if it is 1 or 0. If it is 1, update dp_0, dp_1, and dp_2 based on the presence of adjacent 1's.
  • Multiply ans with dp_1 or dp_2, whichever is larger. If dp_0 is not 0, multiply ans with dp_0.
  • Return the final value of ans.

Implementation:

C++
// C++ program for above approach #include <bits/stdc++.h> using namespace std;  // Function to return the // total different combination // possible int total_count(string s, int n) {     int ans = 1, dp_0 = 0, dp_1 = 0, dp_2 = 0;      // Base cases     if (s[0] == '1')         dp_0 = 1;      if (s[1] == '1' && s[1] == s[0]) {         dp_1 = 2;     }     else if (s[1] == '1') {         dp_1 = 1;     }      // Iterating through every index     // and storing the total     // combination of string due to     // all the adjacent 1's.     for (int i = 2; i < n; i++) {         if (s[i] == '1') {             if (s[i] == s[i - 1]) {                 if (s[i - 1] == s[i - 2]) {                     int temp = dp_2;                     dp_2 = dp_1 + dp_0;                     dp_0 = dp_1;                     dp_1 = temp;                 }                 else {                     dp_2 = dp_1;                     dp_1 = 2;                     dp_0 = dp_1;                 }             }             else {                 dp_2 = dp_1;                 dp_1 = 1;                 dp_0 = dp_1;             }         }         else {             dp_2 = dp_1;             dp_1 = 0;             dp_0 = dp_1;         }     }      // Total combinations possible     // by multiplying all the individual     // combinations.     if (dp_1 > dp_2) {         ans = ans * dp_1;     }     else {         ans = ans * dp_2;     }      // Edge case     if (dp_0 != 0) {         ans = ans * dp_0;     }      // Returning the final value     return ans; }  // Driver code int main() {     string str = "11011";     int N;     N = str.size();      // Function call     cout << total_count(str, N);     return 0; }  // this code is contributed by bhardwajji 
Java
public class Main {     // Function to return the total different combination possible     static int total_count(String s, int n) {         int ans = 1, dp_0 = 0, dp_1 = 0, dp_2 = 0;          // Base cases         if (s.charAt(0) == '1')             dp_0 = 1;          if (s.charAt(1) == '1' && s.charAt(1) == s.charAt(0)) {             dp_1 = 2;         }         else if (s.charAt(1) == '1') {             dp_1 = 1;         }          // Iterating through every index and storing the total combination            // of string due to all the adjacent 1's.         for (int i = 2; i < n; i++) {             if (s.charAt(i) == '1') {                 if (s.charAt(i) == s.charAt(i - 1)) {                     if (s.charAt(i - 1) == s.charAt(i - 2)) {                         int temp = dp_2;                         dp_2 = dp_1 + dp_0;                         dp_0 = dp_1;                         dp_1 = temp;                     }                     else {                         dp_2 = dp_1;                         dp_1 = 2;                         dp_0 = dp_1;                     }                 }                 else {                     dp_2 = dp_1;                     dp_1 = 1;                     dp_0 = dp_1;                 }             }             else {                 dp_2 = dp_1;                 dp_1 = 0;                 dp_0 = dp_1;             }         }          // Total combinations possible by multiplying all the individual combinations.         if (dp_1 > dp_2) {             ans = ans * dp_1;         }else {             ans = ans * dp_2;         }         // Edge case         if (dp_0 != 0) {             ans = ans * dp_0;         }         // Returning the final value         return ans;     }        // driver code to test above functions     public static void main(String[] args) {         String str = "11011";         int N;         N = str.length();          // Function call         System.out.println(total_count(str, N));     } } 
Python3
def total_count(s: str, n: int) -> int:     ans, dp_0, dp_1, dp_2 = 1, 0, 0, 0          # Base cases     if s[0] == '1':         dp_0 = 1      if s[1] == '1' and s[1] == s[0]:         dp_1 = 2     elif s[1] == '1':         dp_1 = 1      # Iterating through every index     # and storing the total combination     # of string due to all the adjacent 1's.     for i in range(2, n):         if s[i] == '1':             if s[i] == s[i - 1]:                 if s[i - 1] == s[i - 2]:                     temp = dp_2                     dp_2 = dp_1 + dp_0                     dp_0 = dp_1                     dp_1 = temp                 else:                     dp_2 = dp_1                     dp_1 = 2                     dp_0 = dp_1             else:                 dp_2 = dp_1                 dp_1 = 1                 dp_0 = dp_1         else:             dp_2 = dp_1             dp_1 = 0             dp_0 = dp_1      # Total combinations possible     # by multiplying all the individual     # combinations.     if dp_1 > dp_2:         ans = ans * dp_1     else:         ans = ans * dp_2      # Edge case     if dp_0 != 0:         ans = ans * dp_0      # Returning the final value     return ans  # Driver code if __name__ == '__main__':     str = "11011"     N = len(str)      # Function call     print(total_count(str, N)) 
C#
using System;  public class MainClass {      // Function to return the total different combination possible     static int total_count(string s, int n) {         int ans = 1, dp_0 = 0, dp_1 = 0, dp_2 = 0;          // Base cases         if (s[0] == '1')             dp_0 = 1;          if (s[1] == '1' && s[1] == s[0]) {             dp_1 = 2;         }         else if (s[1] == '1') {             dp_1 = 1;         }          // Iterating through every index and storing the total combination          // of string due to all the adjacent 1's.         for (int i = 2; i < n; i++) {             if (s[i] == '1') {                 if (s[i] == s[i - 1]) {                     if (s[i - 1] == s[i - 2]) {                         int temp = dp_2;                         dp_2 = dp_1 + dp_0;                         dp_0 = dp_1;                         dp_1 = temp;                     }                     else {                         dp_2 = dp_1;                         dp_1 = 2;                         dp_0 = dp_1;                     }                 }                 else {                     dp_2 = dp_1;                     dp_1 = 1;                     dp_0 = dp_1;                 }             }             else {                 dp_2 = dp_1;                 dp_1 = 0;                 dp_0 = dp_1;             }         }          // Total combinations possible by multiplying all the         // individual combinations.         if (dp_1 > dp_2) {             ans = ans * dp_1;         }else {             ans = ans * dp_2;         }         // Edge case         if (dp_0 != 0) {             ans = ans * dp_0;         }         // Returning the final value         return ans;     }      // driver code to test above functions     public static void Main(string[] args) {         string str = "11011";         int N;         N = str.Length;          // Function call         Console.WriteLine(total_count(str, N));     } } 
JavaScript
function total_count(s, n) {     let ans = 1, dp_0 = 0, dp_1 = 0, dp_2 = 0;          // Base cases     if (s[0] == '1') {         dp_0 = 1;     }      if (s[1] == '1' && s[1] == s[0]) {         dp_1 = 2;     } else if (s[1] == '1') {         dp_1 = 1;     }      // Iterating through every index     // and storing the total combination     // of string due to all the adjacent 1's.     for (let i = 2; i < n; i++) {         if (s[i] == '1') {             if (s[i] == s[i - 1]) {                 if (s[i - 1] == s[i - 2]) {                     let temp = dp_2;                     dp_2 = dp_1 + dp_0;                     dp_0 = dp_1;                     dp_1 = temp;                 } else {                     dp_2 = dp_1;                     dp_1 = 2;                     dp_0 = dp_1;                 }             } else {                 dp_2 = dp_1;                 dp_1 = 1;                 dp_0 = dp_1;             }         } else {             dp_2 = dp_1;             dp_1 = 0;             dp_0 = dp_1;         }     }      // Total combinations possible     // by multiplying all the individual     // combinations.     if (dp_1 > dp_2) {         ans *= dp_1;     } else {         ans *= dp_2;     }      // Edge case     if (dp_0 != 0) {         ans *= dp_0;     }      // Returning the final value     return ans; }  // Driver code let str = "11011"; let N = str.length;  // Function call console.log(total_count(str, N)); 

Output:

4

Time complexity: O(N)
Auxiliary Space: O(1)


Next Article
Count permutations possible by replacing '?' characters in a Binary String

P

pushpeshrajdx01
Improve
Article Tags :
  • Strings
  • Dynamic Programming
  • Geeks Premier League
  • DSA
  • Geeks-Premier-League-2022
  • permutation
  • binary-string
Practice Tags :
  • Dynamic Programming
  • permutation
  • Strings

Similar Reads

  • Check if it is possible to rearrange a binary string with alternate 0s and 1s
    Given a binary string of length, at least two. We need to check if it is possible to rearrange a binary string such that there are alternate 0s and 1s. If possible, then the output is YES, otherwise the output is NO. Examples: Input : 1011 Output : NO We can't rearrange the string such that it has a
    5 min read
  • Count permutations possible by replacing '?' characters in a Binary String
    Given a string S consisting of characters 0, 1, and '?', the task is to count all possible combinations of the binary string formed by replacing '?' by 0 or 1. Examples: Input: S = "0100?110"Output: 2Explanation: Replacing each '?'s with '1' and '0', the count of such strings formed will be equal to
    4 min read
  • Count Number of Distinct Binary Strings After Applying Flip Operations
    Given a binary string s and a positive integer k. In a operation you can repeatedly choose any substring of length k in s and flip all its characters (0s to 1s, 1s to 0s). The task is to return the number of distinct strings that can be obtained, modulo 10^9 + 7. You can perform the flip operation a
    5 min read
  • Check if substring "10" occurs in the given binary string in all possible replacements of '?' with 1 or 0
    Given a string S consisting of only '0', '1' and '?', the task is to check if there exists a substring "10" in every possible replacement of the character '?' with either 1 or 0. Examples: Input: S = "1?0"Output: YesExplanation:Following are all the possible replacements of '?': Replacing the '?' wi
    7 min read
  • Count of distinct XORs formed by rearranging two Binary strings
    Given two binary strings A and B of equal length N, the task is to find the number of distinct XORs possible by arbitrarily reordering the two binary strings. Since the number can be large enough, find the number modulo 109 + 7 Examples: Input: A = "00", B = "01" Output: 2 Explanation: There are two
    15 min read
  • Count of substrings that start and end with 1 in given Binary String
    Given a binary string, count the number of substrings that start and end with 1. Examples: Input: "00100101"Output: 3Explanation: three substrings are "1001", "100101" and "101" Input: "1001"Output: 1Explanation: one substring "1001" Recommended PracticeCount SubstringsTry It!Count of substrings tha
    12 min read
  • Count of non-overlapping sub-strings "101" and "010" in the given binary string
    Given binary string str, the task is to find the count of non-overlapping sub-strings of either the form "010" or "101". Examples: Input: str = "10101010101" Output: 3 str[0..2] = "101" str[3..5] = "010" str[6..8] = "101"Input: str = "111111111111110" Output: 0 Approach: Initialize count = 0 and for
    5 min read
  • Count of distinct Strings possible by swapping prefixes of pairs of Strings from the Array
    Given an array string[] consisting of N numeric strings of length M, the task is to find the number of distinct strings that can be generated by selecting any two strings, say i and j from the array and swap all possible prefixes between them. Note: Since the answer can be very large, print modulo 1
    6 min read
  • Count of all possible N length balanced Binary Strings
    Given a number N, the task is to find the total number of balanced binary strings possible of length N. A binary string is said to be balanced if: The number of 0s and 1s are equal in each binary stringThe count of 0s in any prefix of binary strings is always greater than or equal to the count of 1s
    6 min read
  • Count possible binary strings of length N without P consecutive 0s and Q consecutive 1s
    Given three integers N, P, and Q, the task is to count all possible distinct binary strings of length N such that each binary string does not contain P times consecutive 0’s and Q times consecutive 1's. Examples: Input: N = 5, P = 2, Q = 3Output: 7Explanation: Binary strings that satisfy the given 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