correct the bug in solution. Be clear about the def of LEAF node.