Multi-bracket Validation.
data-structures-and-algorithms
public repository.Branch Name: stack-queue-brackets
Challenge Type: Code Challenge / Algorithm
There are 3 types of brackets:
()
[]
{}
Input | Output |
---|---|
{} |
TRUE |
{}(){} |
TRUE |
()[[Extra Characters]] |
TRUE |
(){}[[]] |
TRUE |
{}{Code}[Fellows](()) |
TRUE |
[({}] |
FALSE |
(]( |
FALSE |
{(}) |
FALSE |
Consider these small examples and why they fail.
Input | Output | Why |
---|---|---|
{ |
FALSE |
error unmatched opening { remaining. |
) |
FALSE |
error closing ) arrived without corresponding opening. |
[} |
FALSE |
error closing } . Doesn’t match opening ( . |
Ensure your complete solution follows the standard requirements.