Parenthesis/Brackets Matching using Stack algorithm

前端 未结 30 2700
你的背包
你的背包 2020-11-27 11:39

For example if the parenthesis/brackets is matching in the following:

({})
(()){}()
()

and so on but if the parenthesis/brackets is not mat

30条回答
  •  [愿得一人]
    2020-11-27 12:23

      Check balanced parenthesis or brackets with stack-- 
      var excp = "{{()}[{a+b+b}][{(c+d){}}][]}";
       var stk = [];   
       function bracket_balance(){
          for(var i=0;i

提交回复
热议问题