Solving Balanced Parentheses Problem Using Regular Expressionsby@tapanavasthi
11,505 reads

Solving Balanced Parentheses Problem Using Regular Expressions

tldt arrow
EN
Read on Terminal Reader
Read this story w/o Javascript

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

@tapanavasthi

Tapan Avasthi

Receive Stories from @tapanavasthi

react to story with heart

RELATED STORIES

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