I have this question in my coding club, and I'm kind of confused.
Given a string containing '(', ')', '{', '}', '[', ']', write a function that returns true/false if the string is a valid expression. An expression is considered valid if:
Each type of bracket is properly closed.
Open brackets must be closed in the correct order.
For example: "()", "()[]{}", and "{[]}" are valid expressions.
"(]", "([)]", and "{" are not valid expressions.
return true if the string is valid, otherwise return false.
Can someone explain to me how to code this?