Given a long list of integers. Return the elements except of last N. You should not load all the list into the memory and should not iterate all the items twice.
 
Test set 1
Result:
 
Test set 2
Result:
 
Test set 3
Result:
 
Test set 4
Result:
 
Test set 5
Result:
 
Test set 6
Result: