If root is a leaf node and it 's level   is less than k then remove this node.   This goes up and check for the ancestor   nodes also for the same condition till  it finds a node which is a part of other   path(s) too.
if ( root . left == None and root . right == None and level < k ) : NEW_LINE INDENT return None NEW_LINE DEDENT