Balanced Brackets|| stacks|| CPP || do subscribe || do like ||

Pubblicato il: 31 agosto 2022
sul canale di: code it
26
2

from a given string of having parenthesis determining is it a valid parenthesis or not !

Sample Input::
----- --------
3 n = 3
{[()]} first s = '{[()]}'
{[(])} second s = '{[(])}'
{{[[(())]]}} third s ='{{[[(())]]}}'

Sample Output:

YES
NO
YES

Explanation
The string {[()]} meets both criteria for being a balanced string.
The string {[(])} is not balanced because the brackets enclosed by the matched pair { and } are not balanced: [(]).
The string {{[[(())]]}} meets both criteria for being a balanced string.


In questa pagina del sito puoi guardare il video online Balanced Brackets|| stacks|| CPP || do subscribe || do like || della durata di ore minuti seconda in buona qualità , che l'utente ha caricato code it 31 agosto 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 26 volte e gli è piaciuto 2 spettatori. Buona visione!