Help for this page

Select Code to Download


  1. or download this
    sub balanced
    {
    ...
            return 0 if /[()]/;
            return 1;
    }
    
  2. or download this
    sub balanced
    {
    ...
                    } elsif ($char eq ')') {
                            $stack--;
                    }
    
  3. or download this
                    return 0 if $stack < 0;
        }
    
            return $stack ? 0 : 1;
    }