one way serialize binary tree use preorder traversal when encounter nonnull node record node value if null node record sentinel value for example binary tree serialize string 934126 represent null nodeGiven stre commaseparated value preorder return true correct preorder traversal serialization binary treeIt guarantee commaseparated value string integer character represent null pointeryou assume input format validFor example contain consecutive commas 13note you allow reconstruct tree Example 1input preorder 934126output trueExample 2input preorder 1output falseExample 3input preorder 91output false Constraints1 preorderlength 104preorder consist integer range 0 100 separate commas