Red-Black Tree Code to check if the parenthesis representation of a given binary tree is a red-black tree