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 Searching Algorithms
  • MCQs on Searching Algorithms
  • Tutorial on Searching Algorithms
  • Linear Search
  • Binary Search
  • Ternary Search
  • Jump Search
  • Sentinel Linear Search
  • Interpolation Search
  • Exponential Search
  • Fibonacci Search
  • Ubiquitous Binary Search
  • Linear Search Vs Binary Search
  • Interpolation Search Vs Binary Search
  • Binary Search Vs Ternary Search
  • Sentinel Linear Search Vs Linear Search
Open In App

Search in a row wise and column wise sorted matrix

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

Given a matrix mat[][] and an integer x, the task is to check if x is present in mat[][] or not. Every row and column of the matrix is sorted in increasing order.

Examples: 

Input: x = 62, mat[][] = [[3, 30, 38],
[20, 52, 54],
[35, 60, 69]]
Output: false
Explanation: 62 is not present in the matrix.

Input: x = 55, mat[][] = [[18, 21, 27],
[38, 55, 67]]
Output: true
Explanation: mat[1][1] is equal to 55.

Input: x = 35, mat[][] = [[3, 30, 38],
[20, 52, 54],
[35, 60, 69]]
Output: true
Explanation: mat[2][0] is equal to 35.

Table of Content

  • [Naive Approach] Comparing with all elements – O(n*m) Time and O(1) Space
  • [Better Approach] Binary Search – O(n*logm) Time and O(1) Space:
  • [Expected Approach] Eliminating rows or columns – O(n + m) Time and O(1) Space:

[Naive Approach] Comparing with all elements – O(n*m) Time and O(1) Space

The simple idea is to traverse the complete matrix and search for the target element. If the target element is found, return true. Otherwise, return false.

C++
// C++ program to search an element in row-wise // and column-wise sorted matrix   #include <iostream> #include <vector>  using namespace std;  bool matSearch(vector<vector<int>> &mat, int x) {     int n = mat.size(), m = mat[0].size();        // Iterate over all the elements to find x 	for(int i = 0; i < n; i++) {     	for(int j = 0; j < m; j++) {         	if(mat[i][j] == x)                 return true;         }     }        // If x was not found, return false     return false; }  int main() {     vector<vector<int>> mat = {{3, 30, 38},                                {20, 52, 54},                                {35, 60, 69}};     int x = 35;     if(matSearch(mat, x))          cout << "true";     else          cout << "false";     return 0; } 
Java
// Java program to search an element in row-wise // and column-wise sorted matrix  class GfG {     static boolean matSearch(int[][] mat, int x) {         int n = mat.length, m = mat[0].length;                for(int i = 0; i < n; i++) {             for(int j = 0; j < m; j++) {                 if(mat[i][j] == x)                     return true;             }         }                // If x was not found, return false         return false;     }      public static void main(String[] args) {         int[][] mat = {{3, 30, 38},                        {20, 52, 54}, 					   {35, 60, 69}};         int x = 35;                  if(matSearch(mat, x))              System.out.println("true");         else              System.out.println("false");     } } 
Python
# Python program to search an element in row-wise # and column-wise sorted matrix  def matSearch(mat, x):     n = len(mat)     m = len(mat[0])        for i in range(n):         for j in range(m):             if mat[i][j] == x:                 return True        # If x was not found, return false     return False  if __name__ == "__main__":     mat = [[3, 30, 38], 		   [20, 52, 54],            [35, 60, 69]]     x = 35     if matSearch(mat, x):         print("true")     else:         print("false") 
C#
// C# program to search an element in row-wise // and column-wise sorted matrix  using System;  class GfG {     static bool matSearch(int[][] mat, int x) {         int n = mat.Length, m = mat[0].Length;          for (int i = 0; i < n; i++) {             for (int j = 0; j < m; j++) {                 if (mat[i][j] == x)                     return true;             }         }          // If x was not found, return false         return false;     }      static void Main() {         int[][] mat = new int[][] {             new int[] {3, 30, 38},             new int[] {20, 52, 54},             new int[] {35, 60, 69}         };         int x = 35;          if (matSearch(mat, x))             Console.WriteLine("true");         else             Console.WriteLine("false");     } } 
JavaScript
// Java Script program to search an element in row-wise // and column-wise sorted matrix  function matSearch(mat, x) {     const n = mat.length, m = mat[0].length;      for (let i = 0; i < n; i++) {         for (let j = 0; j < m; j++) {             if (mat[i][j] === x)                 return true;         }     }      // If x was not found, return false     return false; }  // Driver Code const mat = [ [ 3, 30, 38 ],      		  [ 20, 52, 54 ],               [ 35, 60, 69 ] ]; const x = 35;  if (matSearch(mat, x))     console.log("true"); else     console.log("false"); 

Output
true

[Better Approach] Binary Search – O(n*logm) Time and O(1) Space:

To optimize the above approach we are going to use the Binary Search algorithm.
The problem specifies that each row in the given matrix is sorted in ascending order. Instead of searching each column sequentially, we can efficiently apply Binary Search on each row to determine if the target is present.

C++
// C++ program to search an element in row-wise // and column-wise sorted matrix  #include <iostream> #include <vector>  using namespace std;  bool binarySearch(vector<int> &mat, int target) {     int n = mat.size();     int low = 0, high = n - 1;      // Standard binary search algorithm     while (low <= high) {         int mid = (low + high) / 2;                  if (mat[mid] == target)              return true;  // Element found         else if (target > mat[mid])              low = mid + 1; // Search in the right half         else              high = mid - 1; // Search in the left half     }     return false;  // Element not found }  bool matSearch(vector<vector<int>> &mat, int x) {     int n = mat.size();      // Iterate over each row and perform binary search     for (int i = 0; i < n; i++) {         if (binarySearch(mat[i], x))              return true;  // Element found in one of the rows     }          return false;  // Element not found in any row }  int main() {     vector<vector<int>> mat = {{3, 30, 38},                                {20, 52, 54},                                {35, 60, 69}};     int x = 35;     if(matSearch(mat, x))          cout << "true";     else          cout << "false";     return 0; } 
Java
// Java program to search an element in row-wise // and column-wise sorted matrix  class GfG {     public static boolean binarySearch(int[] mat, int target) {         int low = 0, high = mat.length - 1;          // Standard binary search algorithm         while (low <= high) {             int mid = (low + high) / 2;              if (mat[mid] == target)                  return true;  // Element found             else if (target > mat[mid])                  low = mid + 1; // Search in the right half             else                  high = mid - 1; // Search in the left half         }         return false;  // Element not found     }          static boolean matSearch(int[][] mat, int x) {         int n = mat.length; // Number of rows          // Iterate over each row and perform binary search         for (int i = 0; i < n; i++) {             if (binarySearch(mat[i], x))                  return true;  // Element found in one of the rows         }         return false;  // Element not found in any row     }      public static void main(String[] args) {         int[][] mat = {{3, 30, 38},                        {20, 52, 54}, 					   {35, 60, 69}};         int x = 35;                  if(matSearch(mat, x))              System.out.println("true");         else              System.out.println("false");     } } 
Python
# Python program to search an element in row-wise # and column-wise sorted matrix  def binarySearch(mat, target):          n = len(mat)     low, high = 0, n - 1      # Standard binary search algorithm     while low <= high:         mid = (low + high) // 2  # Midpoint index          if mat[mid] == target:             return True  # Element found         elif target > mat[mid]:             low = mid + 1  # Search in the right half         else:             high = mid - 1  # Search in the left half      return False  # Element not found  def matSearch(mat, x):      n = len(mat)     m = len(mat[0])      # Iterate over each row and perform binary search     for i in range(n):         if binarySearch(mat[i], x):             return True  # Element found in one of the rows      return False  # Element not found in any row      if __name__ == "__main__":     mat = [         [3, 30, 38],         [20, 52, 54],         [35, 60, 69]     ]     x = 35     if matSearch(mat, x):         print("true")     else:         print("false") 
C#
// C# program to search an element in row-wise // and column-wise sorted matrix   using System;  class GfG {          // Function to perform binary search on a sorted row (1D array)     static bool BinarySearch(int[] mat, int target)     {         int low = 0, high = mat.Length - 1;          // Standard binary search algorithm         while (low <= high)         {             int mid = (low + high) / 2;              if (mat[mid] == target)                 return true; // Element found             else if (target > mat[mid])                 low = mid + 1; // Search in the right half             else                 high = mid - 1; // Search in the left half         }         return false; // Element not found     }          // Function to search an element in a row-wise sorted matrix     static bool matSearch(int[][] mat, int x) {         int n = mat.Length;          // Iterate over each row and perform binary search         for (int i = 0; i < n; i++)         {             if (BinarySearch(mat[i], x))                 return true; // Element found in one of the rows         }          return false; // Element not found in any row     }      static void Main() {         int[][] mat = new int[][] {             new int[] {3, 30, 38},             new int[] {20, 52, 54},             new int[] {35, 60, 69}         };         int x = 35;          if (matSearch(mat, x))             Console.WriteLine("true");         else             Console.WriteLine("false");     } } 
JavaScript
// JavaScript program to search an element in row-wise // and column-wise sorted matrix   function binarySearch(mat, target) {     let low = 0, high = mat.length - 1;      // Standard binary search algorithm     while (low <= high) {         let mid = Math.floor((low + high) / 2); // Use Math.floor() to get an integer index          if (mat[mid] === target)              return true;  // Element found         else if (target > mat[mid])              low = mid + 1; // Search in the right half         else              high = mid - 1; // Search in the left half     }     return false;  // Element not found }  function matSearch(mat, x) {     let n = mat.length;      // Iterate over each row and perform binary search     for (let i = 0; i < n; i++) {         if (binarySearch(mat[i], x))              return true;  // Element found in one of the rows     }          return false;  // Element not found in any row }  // Driver Code let mat = [     [3, 30, 38],     [20, 52, 54],     [35, 60, 69] ]; let x = 35;  if (matSearch(mat, x))     console.log("true"); else     console.log("false"); 

Output
true


[Expected Approach] Eliminating rows or columns – O(n + m) Time and O(1) Space:

The idea is to remove a row or column in each comparison until an element is found. Start searching from the top-right corner of the matrix. There are 3 possible cases:

  1. x is greater than the current element: This ensures that all the elements in the current row are smaller than the given number as the pointer is already at the right-most element and the row is sorted. Thus, the entire row gets eliminated and continues the search from the next row.
  2. x is smaller than the current element: This ensures that all the elements in the current column are greater than the given number. Thus, the entire column gets eliminated and continues the search from the previous column, i.e. the column on the immediate left.
  3. The given number is equal to the current number: This will end the search.

Illustration:


C++
// C++ program to search an element in row-wise // and column-wise sorted matrix   #include <iostream> #include <vector>  using namespace std;  bool matSearch(vector<vector<int>> &mat, int x) {     int n = mat.size(), m = mat[0].size();     int i = 0, j = m - 1;        while(i < n && j >= 0) {                // If x > mat[i][j], then x will be greater         // than all elements to the left of          // mat[i][j] in row i, so increment i     	if(x > mat[i][j]) {         	i++;         }                // If x < mat[i][j], then x will be smaller         // than all elements to the bottom of         // mat[i][j] in column j, so decrement j         else if(x < mat[i][j]) {         	j--;         }                // If x = mat[i][j], return true         else {             return true;         }     }        // If x was not found, return false     return false; }  int main() {     vector<vector<int>> mat = {{3, 30, 38},                                {20, 52, 54},                                {35, 60, 69}};     int x = 35;     if(matSearch(mat, x))          cout << "true";     else          cout << "false";     return 0; } 
Java
// Java program to search an element in row-wise // and column-wise sorted matrix  import java.util.*;  class GfG {     static boolean matSearch(int[][] mat, int x) {         int n = mat.length, m = mat[0].length;         int i = 0, j = m - 1;          while (i < n && j >= 0) {              // If x > mat[i][j], then x will be greater             // than all elements to the left of              // mat[i][j] in row i, so increment i             if (x > mat[i][j]) {                 i++;             }              // If x < mat[i][j], then x will be smaller             // than all elements to the bottom of             // mat[i][j] in column j, so decrement j             else if (x < mat[i][j]) {                 j--;             }              // If x = mat[i][j], return true             else {                 return true;             }         }          // If x was not found, return false         return false;     }      public static void main(String[] args) {         int[][] mat = {             {3, 30, 38},             {20, 52, 54},             {35, 60, 69}         };         int x = 35;          if (matSearch(mat, x))             System.out.println("true");         else             System.out.println("false");     } } 
Python
# Python program to search an element in row-wise # and column-wise sorted matrix  def matSearch(mat, x):     n = len(mat)     m = len(mat[0])     i = 0     j = m - 1      while i < n and j >= 0:                # If x > mat[i][j], then x will be greater         # than all elements to the left of          # mat[i][j] in row i, so increment i         if x > mat[i][j]:             i += 1                # If x < mat[i][j], then x will be smaller         # than all elements to the bottom of         # mat[i][j] in column j, so decrement j         elif x < mat[i][j]:             j -= 1                # If x = mat[i][j], return true         else:             return True      # If x was not found, return false     return False  if __name__ == "__main__":     mat = [         [3, 30, 38],         [20, 52, 54],         [35, 60, 69]     ]     x = 35     if matSearch(mat, x):         print("true")     else:         print("false") 
C#
// C# program to search an element in row-wise // and column-wise sorted matrix   using System;  class GfG {     static bool matSearch(int[][] mat, int x) {         int n = mat.Length, m = mat[0].Length;         int i = 0, j = m - 1;          while (i < n && j >= 0) {              // If x > mat[i][j], then x will be greater             // than all elements to the left of              // mat[i][j] in row i, so increment i             if (x > mat[i][j]) {                 i++;             }              // If x < mat[i][j], then x will be smaller             // than all elements to the bottom of             // mat[i][j] in column j, so decrement j             else if (x < mat[i][j]) {                 j--;             }              // If x = mat[i][j], return true             else {                 return true;             }         }          // If x was not found, return false         return false;     }      static void Main() {         int[][] mat = new int[][] {             new int[] {3, 30, 38},             new int[] {20, 52, 54},             new int[] {35, 60, 69}         };         int x = 35;          if (matSearch(mat, x))             Console.WriteLine("true");         else             Console.WriteLine("false");     } } 
JavaScript
// JavaScript program to search an element in row-wise // and column-wise sorted matrix   function matSearch(mat, x) {     let n = mat.length, m = mat[0].length;     let i = 0, j = m - 1;      while (i < n && j >= 0) {          // If x > mat[i][j], then x will be greater         // than all elements to the left of          // mat[i][j] in row i, so increment i         if (x > mat[i][j]) {             i++;         }          // If x < mat[i][j], then x will be smaller         // than all elements to the bottom of         // mat[i][j] in column j, so decrement j         else if (x < mat[i][j]) {             j--;         }          // If x = mat[i][j], return true         else {             return true;         }     }      // If x was not found, return false     return false; }  // Driver Code let mat = [ 	[3, 30, 38],     [20, 52, 54], 	[35, 60, 69] ]; let x = 35;  if (matSearch(mat, x)) 	console.log("true"); else 	console.log("false"); 

Output
true


Related Article: Search element in a sorted matrix



author
kartik
Improve
Article Tags :
  • DSA
  • Matrix
  • Searching
  • Accolite
  • Adobe
  • Amazon
  • Directi
  • FactSet
  • Goldman Sachs
  • Groupon
  • InMobi
  • MakeMyTrip
  • Ola Cabs
  • Oracle
  • Paytm
  • Polycom
  • SAP Labs
  • Snapdeal
  • TinyOwl
  • Visa
Practice Tags :
  • Accolite
  • Adobe
  • Amazon
  • Directi
  • FactSet
  • Goldman Sachs
  • Groupon
  • InMobi
  • MakeMyTrip
  • Ola Cabs
  • Oracle
  • Paytm
  • Polycom
  • SAP Labs
  • Snapdeal
  • TinyOwl
  • Visa
  • Matrix
  • Searching

Similar Reads

  • Linear Search Algorithm
    Given an array, arr of n integers, and an integer element x, find whether element x is present in the array. Return the index of the first occurrence of x in the array, or -1 if it doesn't exist. Input: arr[] = [1, 2, 3, 4], x = 3Output: 2Explanation: There is one test case with array as [1, 2, 3 4]
    9 min read
  • What is Linear Search?
    Linear search is defined as the searching algorithm where the list or data set is traversed from one end to find the desired value. Linear search works by sequentially checking each element in the list until the desired value is found or the end of the list is reached. Properties of Linear search :T
    3 min read
  • Linear Search in different languages

    • C Program for Linear Search
      Linear Search is a sequential searching algorithm in C that is used to find an element in a list. Linear Search compares each element of the list with the key till the element is found or we reach the end of the list. Example Input: arr = {10, 50, 30, 70, 80, 60, 20, 90, 40}, key: 30Output: Key Foun
      4 min read

    • C++ Program For Linear Search
      Linear search algorithm is the simplest searching algorithm that is used to find an element in the given collection. It simply compares the element to find with each element in the collection one by one till the matching element is found or there are no elements left to compare. In this article, we
      4 min read

    • Java Program for Linear Search
      Linear Search is the simplest searching algorithm that checks each element sequentially until a match is found. It is good for unsorted arrays and small datasets. Given an array a[] of n elements, write a function to search for a given element x in a[] and return the index of the element where it is
      2 min read

    • Linear Search - Python
      Given an array, arr of n elements, and an element x, find whether element x is present in the array. Return the index of the first occurrence of x in the array, or -1 if it doesn’t exist. Examples: Input: arr[] = [10, 50, 30, 70, 80, 20, 90, 40], x = 30Output : 2Explanation: For array [10, 50, 30, 7
      4 min read

    • 8085 program for Linear search | Set 2
      Problem - Write an assembly language program in 8085 microprocessor to find a given number in the list of 10 numbers, if found store 1 in output else store 0 in output. Example - Assumption - Data to be found at 2040H, list of numbers from 2050H to 2059H and output at 2060H. Algorithm - Load data by
      2 min read

  • Recursive Linear Search Algorithm
    Linear Search is defined as a sequential search algorithm that starts at one end and goes through each element of a list until the desired element is found, otherwise the search continues till the end of the data set. How Linear Search Works?Linear search works by comparing each element of the data
    6 min read
  • Sentinel Linear Search
    Sentinel Linear Search as the name suggests is a type of Linear Search where the number of comparisons is reduced as compared to a traditional linear search. In a traditional linear search, only N comparisons are made, and in a Sentinel Linear Search, the sentinel value is used to avoid any out-of-b
    7 min read
  • Is Sentinel Linear Search better than normal Linear Search?
    Sentinel Linear search is a type of linear search where the element to be searched is placed in the last position and then all the indices are checked for the presence of the element without checking for the index out of bound case. The number of comparisons is reduced in this search as compared to
    8 min read
  • Improving Linear Search Technique
    A linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched. It is observed that when searching for a key element, then there is a possibility for searching the same
    15+ min read
  • Linear search using Multi-threading
    Given a large file of integers, search for a particular element in it using multi-threading. Examples: Input : 1, 5, 7, 10, 12, 14, 15, 18, 20, 22, 25, 27, 30, 64, 110, 220Output :if key = 20Key element foundInput :1, 5, 7, 10, 12, 14, 15, 18, 20, 22, 25, 27, 30, 64, 110, 220Output :if key = 202Key
    5 min read
  • Visualization of Linear Search

    • Linear Search Visualizer using PyQt5
      In this article we will see how we can make a PyQt5 application which will visualize the linear search algorithm. Linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been sea
      5 min read

    • Linear Search Visualization using JavaScript
      GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Linear Search using JavaScript. We will see how the elements are being traversed in Linear Search until the given element is found. We will also visualize the time complexity of Linear Se
      3 min read

    Some Problems on Linear Search

    • Number of comparisons in each direction for m queries in linear search
      Given an array containing N distinct elements. There are M queries, each containing an integer X and asking for the index of X in the array. For each query, the task is to perform linear search X from left to right and count the number of comparisons it took to find X and do the same thing right to
      7 min read

    • Search an element in an unsorted array using minimum number of comparisons
      Given an array of n distinct integers and an element x. Search the element x in the array using minimum number of comparisons. Any sort of comparison will contribute 1 to the count of comparisons. For example, the condition used to terminate a loop, will also contribute 1 to the count of comparisons
      7 min read

    • Search in a row wise and column wise sorted matrix
      Given a matrix mat[][] and an integer x, the task is to check if x is present in mat[][] or not. Every row and column of the matrix is sorted in increasing order. Examples: Input: x = 62, mat[][] = [[3, 30, 38], [20, 52, 54], [35, 60, 69]]Output: falseExplanation: 62 is not present in the matrix. In
      14 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