Skip to content

func RemoveByValue in doublylinkedlist.go may have one problem #14

@tmac33

Description

@tmac33

the block as below

current := list.head
	for current.next != nil {
		if current.next.data == i {
			if current.next.next != nil {
				current.next.next.prev = current
			}
			current.next = current.next.next
			return true
		}
		current = current.next
	}

there should no current.next.next==nil condition, if current.next.next==nil, then current.next will be the list.tail

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