Skip to content

DSA

Algorithms, Data Structures, Competitive Coding, and problems from LeetCode with complete Solution Approach, Pseudocode, and Explanation.

Indirect Recursion and direct recursion

Direct & Indirect Recursion

In programming, Recursion means a function calling itself. The best use of recursion is when we have a big/complex problem and is solved by breaking down the problem into smaller instances. In this post, we’ll see direct and indirect recursion. Types of Recursion Generally, there are two main types of… Read More »Direct & Indirect Recursion

Brackets Balanced Program

Balanced Parenthesis Program

We have an expression that contains brackets and alphanumeric characters, and we need to check whether the parenthesis are balanced or not. Balanced Parenthesis means an equal number of opening and closing brackets. Example Solution Approach – Using Stack Why Stack Data Structure? Here, our priority is to find if… Read More »Balanced Parenthesis Program