Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
str = 'series{d-96}x11{second}';
y_correct = {'d-96';'second'};
assert(isempty(find(strcmp(parseBrackets(str),y_correct)==0)))
|
2 | Pass |
str = 'x=rho*x{-1}+(1-rho)*y{+1}';
y_correct = {'-1';'+1'};
assert(isempty(find(strcmp(parseBrackets(str),y_correct)==0)))
|
3 | Pass |
str = 'hello there; this string contains no braces';
y_correct = {};
assert(isempty(find(strcmp(parseBrackets(str),y_correct)==0)))
|
4 | Pass |
str = '{one} two three {four} five {six} seven';
y_correct = {'one';'four';'six'};
assert(isempty(find(strcmp(parseBrackets(str),y_correct)==0)))
|
5 | Pass |
str = '{Where} in the world {is the} thick, red {encyclopedia?}';
y_correct = {'Where';'is the';'encyclopedia?'};
assert(isempty(find(strcmp(parseBrackets(str),y_correct)==0)))
|
4835 Solvers
Number of 1s in the Binary Representation of a Number
319 Solvers
MATCH THE STRINGS (2 CHAR) very easy
194 Solvers
Set x value to each odd index of vector y.
38 Solvers
27 Solvers