Skip to content

SLList wrong function addAfter #81

@changliu98

Description

@changliu98

Line 120

protected void addAfter(Node u, Node v) {
		v = u.next.next;
		u.next = v;
		if (u == tail) 
			tail = v;
}

the v=u.next.next; seems wrong, this function will only delete the node after u

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