Introduction - If you have any usage issues, please Google them yourself
Description is given a binary tree structure to determine binary tree is not complete binary tree. You must use a binary tree class implementation. Input Format input file contains a total N+1 line. The first line contains a positive integer N, the total number of nodes in the tree representation. N+1 second line to the first line, each line contains two integers. Wherein the i-th row of two integers Pi, Qi, representative of the left child node i is Pi, the right child of Qi. If Pi = 0, it indicates that there is no left child node i. Similarly, if Qi = 0, it indicates that there is no right child node i. (Referring to the i-th row in the first line of this N i lines) Output Format If the tree is a complete binary tree is given, the output ' Y' , otherwise the output ' N' . (Exclude quotes)