Merge pull request #956 from Tickylime/master

Update 0707.设计链表.md
This commit is contained in:
程序员Carl
2021-12-27 12:26:59 +08:00
committed by GitHub

View File

@ -706,6 +706,9 @@ func (this *MyLinkedList) AddAtIndex(index int, val int) {
head = head.Next head = head.Next
index-- index--
} }
if index > 0 {
return
}
node := &Node{ node := &Node{
Val: val, Val: val,
//node.Next = MyLinkedList[index] //node.Next = MyLinkedList[index]