问题:在里面的注释里public class Node { private int data;
private Node next; public Node(int data) {
this.data = data;
this.next = null;
} public void setData(int data) {
this.data = data;
} public int getData() {
return data;
} public Node getNext() {
return next;
} public void setNext(Node next) {
this.next = next;
}

}
public class LinkList { Node head; public LinkList() {
head = null;
}

}//实现将输入的数组转化成单链表,并将其插入到给出的单链表的指定位置
public static LinkList linkInsert_L(LinkList l, int idx, int[] arrs){
int count=0;
Node tail=null;
//将数组转换成链表
LinkList head = new LinkList();
for(int i=0;i<arrs.length;i++){
Node d = new Node(arrs[i]);
if(head.head == null){
head.head = d;
}else{
tail.setNext(d);
}
tail = d;
count++;
}
//统计l的节点数
Node t = l.head;
int lc=0;
while(t != null){
lc++;
t=t.getNext();
}

if(idx<1){
tail.setNext(l.head);
l.head=head.head;
}else if(idx>=lc){
Node ltail=l.head;
for(int i=1;i<lc;i++){
ltail=ltail.getNext();
}
ltail.setNext(head.head);
}else{
//问题:代码就加在这里,当链表插在中间任意位置是怎么写啊
}


return l;
}