Driver Code
root = Tree ( 20 ) ; NEW_LINE root . left = Tree ( 9 ) ; NEW_LINE root . right = Tree ( 49 ) ; NEW_LINE root . right . left = Tree ( 23 ) ; NEW_LINE root . right . right = Tree ( 52 ) ; NEW_LINE root . right . right . left = Tree ( 50 ) ; NEW_LINE root . left . left = Tree ( 5 ) ; NEW_LINE root . left . right = Tree ( 12 ) ; NEW_LINE root . left . right . right = Tree ( 12 ) ; NEW_LINE print ( ' Sum ▁ of ▁ left ▁ leaves ▁ is ▁ { } ' . format ( sumOfLeftLeaves ( root ) ) ) NEW_LINE