mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
1. Remove Pair class from hash coliision code.
2. Fix the comment in my_list code. 3. Add a Q&A to the summary of sorting.
This commit is contained in:
@@ -69,7 +69,7 @@ func (l *myList) insert(num, index int) {
|
||||
if l.numsSize == l.numsCapacity {
|
||||
l.extendCapacity()
|
||||
}
|
||||
// 索引 i 以及之后的元素都向后移动一位
|
||||
// 将索引 index 以及之后的元素都向后移动一位
|
||||
for j := l.numsSize - 1; j >= index; j-- {
|
||||
l.nums[j+1] = l.nums[j]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user