remove nth node from the end of list in one pass, handle the case where head should be removed