Solving Balanced Parentheses Problem Using Regular Expressions

Written by tapanavasthi | Published 2020/03/07
Tech Story Tags: algorithms | regular-expressions | pattern-matching | programming | scripting | sed | mindfulness | tech-careers | hackernoon-es

TLDR 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.via the TL;DR App

no story

Published by HackerNoon on 2020/03/07