Finding nodes with one child and tree deletion functions