I heard recently about an interview problem involving matching braces in a string. Checking to see if all the braces in a string are paired up in the proper order. Seemed like an interesting, and short, challenge.
Examples of strings with proper brace matching: "()"
, "(){}[]"
, "([{}])"
Examples of strings without proper brace matching: "("
, "[]]"
, "([)]"