Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ee1995c

Browse files
Merge pull request youngyangyang04#956 from Tickylime/master
Update 0707.设计链表.md
2 parents dac8367 + b2f6e0c commit ee1995c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

problems/0707.设计链表.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ func (this *MyLinkedList) AddAtIndex(index int, val int) {
706706
head = head.Next
707707
index--
708708
}
709+
if index > 0 {
710+
return
711+
}
709712
node := &Node{
710713
Val: val,
711714
//node.Next = MyLinkedList[index]

0 commit comments

Comments
 (0)