Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Newly Launched!
      • Generative AI & ChatGPT
      • 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)
      • Software Testing & Automation (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)
    • GATE Exam Courses
      • GATE CS & IT (Self-Paced)
      • GATE DS & AI (Self-Paced)
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
      • DSA for Beginners
      • Data Structures
        • Arrays
        • Matrix
        • Strings
        • Linked List
        • Stack
        • Queue
        • Tree
          • Generic Tree
          • Binary Tree
          • Binary Search Tree
          • AVL Tree
          • B Tree
          • B+ Tree
          • Red Black Tree
          • Tree Data Structure Tutorial
        • Heap
        • Hashing
        • Graph
        • Set Data Structure
        • Map Data Structure
        • Advanced Data Structure
        • Data Structures Tutorial
      • Algorithms
        • Analysis of Algorithms
        • Searching Algorithms
          • Linear Search
          • Binary Search
          • Searching Algorithms Tutorial
        • Sorting Algorithms
          • Selection Sort
          • Bubble Sort
          • Insertion Sort
          • Merge Sort
          • Quick Sort
          • Heap Sort
          • Counting Sort
          • Radix Sort
          • Bucket Sort
          • Sorting Algorithms Tutorial
        • Greedy Algorithms
        • Dynamic Programming
        • Graph Algorithms
        • Pattern Searching
        • Recursion
        • Backtracking
        • Divide and Conquer
        • Mathematical Algorithms
        • Geometric Algorithms
        • Bitwise Algorithms
        • Randomized Algorithms
        • Branch and Bound
        • Algorithms Tutorial
      • Complete DSA Tutorial
      • Competitive Programming
      • Company Wise SDE Sheets
        • Facebook SDE Sheet
        • Amazon SDE Sheet
        • Apple SDE Sheet
        • Netflix SDE Sheet
        • Google SDE Sheet
        • Wipro Coding Sheet
        • Infosys Coding Sheet
        • TCS Coding Sheet
        • Cognizant Coding Sheet
        • HCL Coding Sheet
      • DSA Cheat Sheets
        • DSA Sheet for Beginners
        • SDE Sheets
        • FAANG Coding Sheet
        • Love Babbaar Sheet
        • Mass Recruiter Sheet
        • Product-Based Coding Sheet
        • Company-Wise Preparation Sheet
      • Top 100 DSA Interview Questions Topic-wise
      • 100 Days of Code
    • Python
      • Python Tutorial
      • Python Exercises
        • Python List Exercise
        • Python String Exercise
        • Python Tuple Exercise
        • Python Dictionary Exercise
        • Python Set Exercise
        • Python Excercises Topic wise
      • Python Quiz
      • Python Programs
      • Advanced Python Tutorial
      • Python API Tutorial
      • Python Database Tutorial
      • Python JSON
      • Python Cheat Sheet
      • Python Projects
      • Python Interview Questions
    • ML & Data Science
      • Machine Learning
        • Machine Learning Tutorial
        • Maths for ML
        • ML Projects
        • 100 Days of Machine Learning
      • Data Science Tutorial
      • Data Science Packages
        • Pandas Tutorial
        • NumPy Tutorial
      • Data Visualization
        • Data Visualization with Python
        • Data Visualization with R
        • Tableau
        • Power BI
      • Data Analysis
        • Data Analysis with Python
        • Data Analysis with R
        • 100 Days of Data Analytics
      • Deep Learning
      • NLP Tutorial
      • OpenCV Tutorial
      • Interview Questions
        • Machine Learning Interview Questions
        • Deep Learning Interview Questions
        • R Interview Questions
    • System Design
      • System Design Tutorial
      • Software Design Patterns
      • System Design Roadmap
      • Top 10 System Design Interview Questions
    • Interview Corner
      • Company Preparation
      • Top Topics
      • Practice Company Questions
      • Interview Experiences
      • Experienced Interviews
      • Internship Interviews
      • Competitive Programming
      • Multiple Choice Quizzes
      • Aptitude for Placements
      • Puzzles for Interviews
    • Languages
      • C
      • C++
      • Java
      • Python
      • R Tutorial
      • C#
      • SQL
      • Scala
      • Perl
      • Go Language
    • Web Development
      • HTML
        • HTML Tutorial
        • Free HTML Course
        • HTML Cheat Sheet
      • CSS
        • CSS Tutorial
        • Free CSS Course
        • CSS Cheat Sheet
      • JavaScript
        • JavaScript Tutorial
        • JavaScript Questions
        • JavaScript Cheat Sheet
        • DSA using JavaScript
        • Free JavaScript Course
        • JavaScript A to Z Complete Guide
      • TypeScript
      • ReactJS
        • ReactJS Tutorial
        • Free ReactJS Course
        • ReactJS Cheat Sheet
        • NextJS
      • Node.js
      • PHP
      • AngularJS
      • jQuery
      • Web Development Using Python
        • Django
        • Flask
        • Selenium
        • Postman
        • Github
      • Web Design
      • 100 Days of Web Development
    • CS Subjects
      • Operating System
      • DBMS
      • Computer Networks
      • Engineering Mathematics
      • Computer Organization and Architecture
      • Theory of Computation
      • Compiler Design
      • Digital Logic
      • Software Engineering
    • DevOps And Linux
      • DevOps Tutorial
      • GIT
      • AWS
      • Kubernetes
      • Docker
      • Microsoft Azure Tutorial
      • Google Cloud Platform
      • DevOps Roadmap
      • DevOps Interview Questions
      • Linux
        • Linux Tutorial
        • Linux Commands A-Z
        • Linux Commands Cheatsheet
        • File Permissions in Linux
        • Linux System Administration
        • Linux Shell Scripting
        • Linux Networking
        • Linux Interview Questions
    • School Learning
      • Class 8 Study Material
      • Class 9 Study Material
      • Class 10 Study Material
      • Class 11Study Material
      • Class 12 Study Material
      • English Grammar
      • GfG School
      • Commerce
    • GATE
      • GATE Computer Science Notes
      • Last Minute Notes
      • GATE CS Solved Papers
      • GATE CS Original Papers and Official Keys
      • GATE CS 2025 Syllabus
      • GATE DA 2025 Syllabus
      • Other CS Exams
        • ISRO
        • UGC NET
    • GeeksforGeeks Videos
  • Jobs
    • Get Hired: Apply for Jobs
    • Corporate Hiring Solutions
    • Filtered Jobs
      • Jobs for Freshers
      • Jobs for Experienced
      • All Jobs
  • Practice
    • All DSA Problems
    • Problem of the Day
    • Company Wise Coding Practice
      • Amazon
      • Microsoft
      • Flipkart
      • Explore All
    • GfG SDE Sheet
    • Practice Problems Difficulty Wise
      • School
      • Basic
      • Easy
      • Medium
      • Hard
    • Language Wise Coding Practice
      • CPP
      • Java
      • Python
    • Curated DSA Lists