public static void main(String[] args) {
int length = 10;
LinkedNode head = CreateLinkedList(10);
}
public static LinkedNode CreateLinkedList(int length){
LinkedNode head = new LinkedNode(length);
head.next = null;
for(int i=0; i<length; i++){
LinkedNode node = new LinkedNode(i);
node.next = head.next;
head.next = node;
}
return head;
}
LinkedList
最新推荐文章于 2024-08-23 23:43:22 发布