public void appendLastN(int k) throws Exception {
if(k>=this.size) return;
int n=size-k;
Node temp=this.head;
for(int i=0;i<n-1;i++ ) {
temp=temp.next;
}
Node t=this.head;
this.head=temp.next;
temp.next=null;
temp=this.head;
while(temp.next!=null) {
temp=temp.next;
}
temp.next=t;
}