upload algorithm which is remove the n th node from end of the list