Skip to content

com.zejian.structures.LinkedList.singleLinked; public HeadSingleILinkedList(Node<T> head) #5

@cc1024201

Description

@cc1024201

//原本
public HeadSingleILinkedList(Node head) {
this();
this.headNode.next =rear.next= head;
rear=rear.next;//更新末尾指针指向
}
//我觉得应该是 this() 初始化后的 rear ben就是null 所以 rear = head 就行了吧
public HeadSingleLinkedList(Node head){
this();
this.headNode.next = rear = head;
rear = rear.next;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions