added code for list.java
Added code for deleteKey() to handle removing ends.