5 lines
95 B
Mathematica
5 lines
95 B
Mathematica
|
|
function x = isbb(s)
|
||
|
|
t = cumsum((s=='[') - (s==']'));
|
||
|
|
x = all(t>=0) && (t(end)==0);
|
||
|
|
end;
|