add remove nth node from end of list solution