Update LinkedList.java

removes every k element