GeeksforGeeks
x
×
Suggest a Topic
menu
    GeeksforGeeks
  • Skip to content
    • Tutorials
      • Algorithms
        • Analysis of Algorithms
          • Asymptotic Analysis
          • Worst, Average and Best Cases
          • Asymptotic Notations
          • Little o and little omega notations
          • Lower and Upper Bound Theory
          • Analysis of Loops
          • Solving Recurrences
          • Amortized Analysis
          • What does ‘Space Complexity’ mean?
          • Pseudo-polynomial Algorithms
          • Polynomial Time Approximation Scheme
          • A Time Complexity Question
        • Searching Algorithms
        • Sorting Algorithms
        • Graph Algorithms
        • Pattern Searching
        • Geometric Algorithms
        • Mathematical
        • Randomized Algorithms
        • Greedy Algorithms
        • Dynamic Programming
        • Divide and Conquer
        • Backtracking
        • Branch and Bound
        • All Algorithms
      • Data Structures
        • Arrays
        • Linked List
        • Stack
        • Queue
        • Binary Tree
        • Binary Search Tree
        • Heap
        • Hashing
        • Graph
        • Advanced Data Structure
        • Matrix
        • Strings
        • All Data Structures
      • Languages
        • C
        • C++
        • Java
        • Python
        • C#
        • Javascript
        • JQuery
        • SQL
        • PHP
        • Scala
        • Perl
        • Go Language
        • HTML
        • CSS
        • Kotlin
      • Interview Corner
        • Company Preparation
        • Top Topics
        • Practice Company Questions
        • Interview Experiences
        • Experienced Interviews
        • Internship Interviews
        • Competitive Programming
        • Design Patterns
        • Multiple Choice Quizzes
      • GATE
        • GATE CS Notes 2020
        • Last Minute Notes
        • GATE CS Solved Papers
        • GATE CS Orignal Papers and Official Keys
        • GATE 2020 Dates
        • GATE CS 2020 Syllabus
        • Important Topics for GATE CS
        • Sudo GATE 2020
      • ISRO CS
        • ISRO CS Solved Papers
        • ISRO CS Original Papers and Official Keys
        • ISRO CS Syllabus for Scientist/Engineer Exam
      • UGC NET CS
        • UGC NET CS Notes Paper II
        • UGC NET CS Notes Paper III
        • UGC NET CS Solved Papers
      • CS Subjects
        • Mathematics
          • First Order Logic
          • Combinatorics
          • Set Theory
          • Graph Theory
          • Linear Algebra
          • Probability
          • Calculus
        • Operating Systems
          • Processes, threads, CPU scheduling
          • Process Synchronization
          • Deadlock
          • Memory Management
          • File and Disk Management
        • DBMS
          • Entity Relationship Model
          • Relational Model
          • Normalisation
          • SQL
          • Transactions and concurrency control
        • Computer Networks
          • Basics
          • Data Link Layer
          • Network layer
          • Transport layer
          • Application layer
          • Network Security and Cryptography
        • Computer Organization and Architecture
          • Basics
          • ALU, data‐path and control unit
          • Pipelining
          • Memory Organisation
          • Input and Output Systems
        • Theory of Computation
          • Regular Languages and Finite Automata
          • Context Free Grammar and Context Free Languages
          • Turing Machine
        • Compiler Design
          • Introduction
          • Lexical Analysis
          • Syntax Analysis
          • Syntax Directed Translation
          • Runtime Environments
          • Code Generation and Optimization
        • Digital Logic
          • Boolean Algebra and Logic Gates
          • Combinational Logic Circuits
          • Flip-Flops and Sequential Circuits
        • Software Engineering
          • Introduction
          • Software Development Models & Architecture
          • Software Project Management
          • Software Requirements
          • Software Testing and Debugging
      • Web Technologies
        • HTML
        • CSS
        • JavaScript
        • PHP
        • JQuery
    • Students
      • Get Hired
      • Campus Ambassador Program
      • Project
      • Geek of the Month
      • Campus Geek of the Month
      • Placement Course
      • Competitive Programming
      • Testimonials
      • Geek on the Top
      • Careers
      • Internship
  • Courses
  • Home
  • All Algorithms
  • Analysis of Algorithms
  • Searching Algorithms
  • Sorting Algorithms
  • Graph Algorithms
  • Bit Algorithms
  • Pattern Searching
  • Geometric Algorithms
  • Mathematical Algorithms
  • Randomized Algorithms
  • Game Theory
  • Greedy Algorithms
  • Dynamic Programming
  • Divide and Conquer
  • Backtracking
  • Branch & Bound
  • All Data Structures
  • Array
  • LinkedList
  • Stack
  • Queue
  • Binary Tree
  • Binary Search Tree
  • Heap
  • Hashing
  • Graph
  • Advanced Data Structure
  • Matrix
  • Strings
  • C
  • C++
  • Java
  • Python
  • SQL
  • PHP
  • Javascript
  • Program Output
  • Company Prep
  • Top Topics
  • Practice Company Questions
  • Interview Experiences
  • Experienced Interviews
  • Internship Interviews
  • Competitive Programming
  • Design Patterns
  • Multiple Choice Quizzes
  • Campus Ambassador Program
  • Geek of the Month
  • Placement Course
  • Project
  • Competitive Programming
  • Testimonials
  • Geek on the Top
  • Careers
  • Internship
  • School Programming
  • GATE CS Corner
  • GATE Notes
  • Last Minute Notes
  • Official Papers
  • Gate 2018 Important Dates and Links
  • Operating Systems
  • DBMS
  • Computer Networks
  • Compiler Design
  • Web Technology
  • Computer Organization & Architecture
  • Digital Electronics
  • Engg. Mathematics
  • Theory of Computation
  • Advanced Topics
  • What’s Difference?
  • C
  • C++
  • Java
  • Python
  • Data Structures
  • Algorithms
  • Operating Systems
  • DBMS
  • Compiler Design
  • Computer Networks
  • Theory of Computation
  • Computer Organization
  • Software Engineering
  • HTML & XML
  • Engg. Mathematics
  • Aptitude
  • GBlog
  • Puzzles
  • What’s New?
    GeeksforGeeks
    Hire with us!
    • Write an Article
    • Courses @ GeeksforGeeks
    • Internships @ GeeksforGeeks
    • Coding Practice
    • How to write an Interview Experience?
    • Must Do Coding Questions Company-wise
    • Must Do Coding Questions Topic-wise
    • Basic
    • Easy
    • Medium
    • Hard
    • Expert
    • Step by Step Preparation
    • Company Preparation
    • Top Topics
    • Company Specific Practice
    • Software Design Patterns
    • Placements Preparation Course
    • Interview Corner
    • Recent Interview Experiences
    • GQ Home Page
    • Quiz Corner
    • LMNs
    • What's New ?
    • Leaderboard !!
    • Topic-wise Practice
    • Subjective Problems
    • Difficulty Level - School
    • Difficulty Level - Basic
    • Difficulty Level - Easy
    • Difficulty Level - Medium
    • Difficulty Level - Hard
    • Explore More...
    • C
    • C++
    • Java
    • Python
    • SQL
    • PHP
    • JavaScript
    • School Programming
    • Operating Systems
    • DBMS
    • Computer Networks
    • Engineering Mathematics
    • Design Patterns
    • Common Interview Puzzles
    • Web Technology
    • G-Facts
    • Computer Graphics
    • Image Processing
    • Project Ideas

    Match a pattern and String without using regular expressions

    4.2

    Given a string, find out if string follows a given pattern or not without using any regular expressions. Examples: Input: string – GraphTreesGraph pattern -… Read More »

    Backtracking

    Finding minimum vertex cover size of a graph using binary search

    4.5

    A vertex cover of an undirected graph is a subset of its vertices such that for every edge (u, v) of the graph, either ‘u’… Read More »

    Graph
    Binary Search

    Compute (a*b)%c such that (a%c) * (b%c) can be beyond range

    3.7

    Given three numbers a, b and c such that a, b and c can be at most 1016. The task is to compute (a*b)%c A… Read More »

    Mathematical
    large-numbers

    Implement a stack using single queue

    2.3

    We are given queue data structure, the task is to implement stack using only given queue data structure. We have discussed a solution that uses… Read More »

    Queue
    Stack

    Zoho Interview Experience | Set 12 (On-Campus)

    4.2

    Recently ZOHO visited our campus for recruitment and i would like to share my experience. Thanks to geeksforgeeks which contributed to most of my preparations..… Read More »

    Interview Experiences
    Zoho

    Data Type Ranges and their macros in C++

    1.2

    Most of the times, in competitive programming, there is a need to assign the variable, the maximum or minimum value that data type can hold,… Read More »

    C
    C++
    Competitive Programming
    cpp-data-types

    Print all subarrays with 0 sum

    3.5

    Given an array, print all subarrays in the array which has sum 0. Examples: Input: arr = [6, 3, -1, -3, 4, -2, 2, 4,… Read More »

    Arrays
    Hash
    Amazon
    Microsoft

    Transpose a matrix in Single line in Python

    2.2

    Transpose of a matrix is a task we all can perform very easily in python (Using a nested loop). But there are some interesting ways… Read More »

    Python

    Ways to copy a vector in C++

    1.7

    In case of arrays, there is no much choice to copy an array into other, other than iterative method i.e running a loop to copy… Read More »

    C
    C++
    cpp-algorithm-library
    cpp-strings-library
    cpp-vector
    STL

    Puzzle 78 | The lost bus Number

    2.3

      Jay was an old friend of Rakesh and was coming to visit him from a small town. Jay came over late. When Rakesh asked… Read More »

    Puzzles

    Heap’s Algorithm for generating permutations

    3.8

    Heap’s algorithm is used to generate all permutations of n objects. The idea is to generate each permutation from the previous permutation by choosing a… Read More »

    Combinatorial
    permutation

    Print cousins of a given node in Binary Tree

    2.7

    Given a binary tree and a node, print all cousins of given node. Note that siblings should not be printed. Example: Input : root of… Read More »

    Tree

    Return from void functions in C++

    1.6

    Void functions are “void” due to the fact that they are not supposed to return values. True, but not completely. We cannot return values but… Read More »

    C
    C++
    CPP-Functions

    Find cubic root of a number

    3.3

    Given a number n, find the cube root of n. Examples: Input: n = 3 Output: Cubic Root is 1.442250 Input: n = 8 Output:… Read More »

    Divide and Conquer
    Mathematical
    Binary Search

    Remove extra spaces from a string

    3.2

    Given a string containing many consecutive spaces, trim all spaces so that all words should contain only a single space between them. The conversion should… Read More »

    Strings
    Page 2,810 of 3,283« First«...102030...2,8082,8092,8102,8112,812...2,8202,8302,840...»Last »


    auto




    Most Popular Articles
    • Must Do Coding Questions for Companies like Amazon, Microsoft, Adobe, ...
    • Find the winner of the Game to Win by erasing any two consecutive similar alphabets
    • Find the integers that doesnot ends with T1 or T2 when squared and added X
    • Average
    • Perl | Reading a CSV File

    Most Visited Articles
    • Program to Encrypt a String using ! and @
    • Compare two strings considering only alphanumeric characters
    • Maximum non-attacking Knights that can be placed on an N*M Chessboard
    • Rat and Poisoned bottle Problem
    • Roots of the quadratic equation when a + b + c = 0 without using Shridharacharya formula

    ✍
    Write a Testimonial
    • GeeksforGeeks
    • 5th Floor, A-118,
    • Sector-136, Noida, Uttar Pradesh - 201305
    • feedback@geeksforgeeks.org
    • COMPANY
    • About Us
    • Careers
    • Privacy Policy
    • Contact Us
    • LEARN
    • Algorithms
    • Data Structures
    • Languages
    • CS Subjects
    • Video Tutorials
    • PRACTICE
    • Courses
    • Company-wise
    • Topic-wise
    • How to begin?
    • CONTRIBUTE
    • Write an Article
    • Write Interview Experience
    • Internships
    • Videos
    @geeksforgeeks, Some rights reserved