Driver program to test above function Perfect Binary Tree of Height 4
root = Node ( 1 ) NEW_LINE root . left = Node ( 2 ) NEW_LINE root . right = Node ( 3 ) NEW_LINE root . left . left = Node ( 4 ) NEW_LINE root . left . right = Node ( 5 ) NEW_LINE root . right . left = Node ( 6 ) NEW_LINE root . right . right = Node ( 7 ) NEW_LINE root . left . left . left = Node ( 8 ) NEW_LINE root . left . left . right = Node ( 9 ) NEW_LINE root . left . right . left = Node ( 10 ) NEW_LINE root . left . right . right = Node ( 11 ) NEW_LINE root . right . left . left = Node ( 12 ) NEW_LINE root . right . left . right = Node ( 13 ) NEW_LINE root . right . right . left = Node ( 14 ) NEW_LINE root . right . right . right = Node ( 15 ) NEW_LINE root . left . left . left . left = Node ( 16 ) NEW_LINE root . left . left . left . right = Node ( 17 ) NEW_LINE root . left . left . right . left = Node ( 18 ) NEW_LINE root . left . left . right . right = Node ( 19 ) NEW_LINE root . left . right . left . left = Node ( 20 ) NEW_LINE root . left . right . left . right = Node ( 21 ) NEW_LINE root . left . right . right . left = Node ( 22 ) NEW_LINE root . left . right . right . right = Node ( 23 ) NEW_LINE root . right . left . left . left = Node ( 24 ) NEW_LINE root . right . left . left . right = Node ( 25 ) NEW_LINE root . right . left . right . left = Node ( 26 ) NEW_LINE root . right . left . right . right = Node ( 27 ) NEW_LINE root . right . right . left . left = Node ( 28 ) NEW_LINE root . right . right . left . right = Node ( 29 ) NEW_LINE root . right . right . right . left = Node ( 30 ) NEW_LINE root . right . right . right . right = Node ( 31 ) NEW_LINE print " Specific ▁ Level ▁ Order ▁ traversal ▁ of ▁ binary ▁ tree ▁ is " NEW_LINE printSpecificLevelOrder ( root ) ; NEW_LINE