Cody

Solution 2068691

Submitted on 24 Dec 2019 by Asif Newaz
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
inStr = '()'; out_correct = true; assert(isequal(isBalanced(inStr),out_correct))

a = 40 41 b = 1 c = 2

2   Pass
inStr = ')'; out_correct = false; assert(isequal(isBalanced(inStr),out_correct))

a = 41 b = [] c = 1

3   Pass
inStr = '(z*(a-(x+3))/(y))'; out_correct = true; assert(isequal(isBalanced(inStr),out_correct))

a = 40 122 42 40 97 45 40 120 43 51 41 41 47 40 121 41 41 b = 1 4 7 14 c = 11 12 16 17

4   Pass
inStr = ')('; out_correct = false; assert(isequal(isBalanced(inStr),out_correct))

a = 41 40 b = 2 c = 1

5   Pass
inStr = '(x)(x-y)'; out_correct = true; assert(isequal(isBalanced(inStr),out_correct))

a = 40 120 41 40 120 45 121 41 b = 1 4 c = 3 8

6   Pass
inStr = ':-)'; out_correct = false; assert(isequal(isBalanced(inStr),out_correct))

a = 58 45 41 b = 1×0 empty double row vector c = 3

7   Pass
inStr = ')()'; out_correct = false; assert(isequal(isBalanced(inStr),out_correct))

a = 41 40 41 b = 2 c = 1 3

8   Pass
inStr = '(()'; out_correct = false; assert(isequal(isBalanced(inStr),out_correct))

a = 40 40 41 b = 1 2 c = 3