paint-brush
Solving Balanced Parentheses Problem Using Regular Expressionsby@tapanavasthi
11,969 reads
11,969 reads

Solving Balanced Parentheses Problem Using Regular Expressions

by Tapan Avasthi5mMarch 7th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

Problem is said to be balanced when it meets two criteria: Last Opened First Closed (LOFC) and the one that opens last is the first one to close LOFC. If the input string is empty, then we’d say that it’s balanced. If the string contains brackets [], parentheses (%), parentheses (), and braces { {) are balanced. We can be a genius to solve it fast, but we need to observe this thinking process slowly. That means we must refrain from using a pen and paper. We must focus entirely on this activity to complete it in a single stretch.

Coin Mentioned

Mention Thumbnail
featured image - Solving Balanced Parentheses Problem Using Regular Expressions
Tapan Avasthi HackerNoon profile picture
Tapan Avasthi

Tapan Avasthi

@tapanavasthi

L O A D I N G
. . . comments & more!

About Author

Tapan Avasthi HackerNoon profile picture
Tapan Avasthi@tapanavasthi

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite