4 lines
81 B
R
4 lines
81 B
R
|
|
balanced <- function(str) {
|
||
|
|
regexpr('^(\\[(?1)*\\])*$', str, perl=TRUE) > -1
|
||
|
|
}
|