Refactor "remove nth node from the end of a list".