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.
Sur cette page du site, vous pouvez voir la vidéo en ligne Balanced Brackets|| stacks|| CPP || do subscribe || do like || durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur code it 31 août 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 26 fois et il a aimé 2 téléspectateurs. Bon visionnage!