text: The algo here just checks if the matching brackets or (nya,nyan) in this case are valid. I add an element to stack whenever an opening bracket is found and remove it when the closing bracket is found. This way the program will only throw error if the user program has mismatched brackets.