Update LinkedDeque.java

optimize some methods