Driver Program
public static void main ( String args [ ] ) { Node root = null ; root = newNode ( 10 ) ; root . left = newNode ( 20 ) ; root . right = newNode ( 30 ) ; root . left . left = newNode ( 40 ) ; root . left . right = newNode ( 50 ) ; root . right . left = newNode ( 60 ) ; root . right . right = newNode ( 70 ) ; if ( isPerfect ( root ) == true ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }