construct a tree
Node root = new Node ( 1 ) ; root . left = new Node ( 2 ) ; root . right = new Node ( 3 ) ; root . left . right = new Node ( 4 ) ; root . right . left = new Node ( 5 ) ; root . right . right = new Node ( 6 ) ; bool result = checkLevelLeafNode ( root ) ; if ( result == true ) Console . WriteLine ( " All ▁ leaf ▁ nodes ▁ are ▁ at ▁ same ▁ level " ) ; else Console . WriteLine ( " Leaf ▁ nodes ▁ not ▁ at ▁ same ▁ level " ) ; } }