Recently I have been using Feynman technique to learn things. So I thought , why not use medium to share what I learned. It will be just like a swiss knife. So , I will be solving the famous stack problem of balanced parentheses or valid parentheses.
This problem is quite popular among the big tech giants and is asked often.
Its also present in leetcode Here is the link:
parentheses means that each opening symbol has a corresponding closing symbol and the pairs of parentheses are properly nested. Consider the following correctly balanced strings of parentheses: