mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
feat: Add visualizing code blocks based on the pythontutor (#1029)
* Update copyright * Update the Python code * Fix the code comments in ArrayBinaryTree * Fix the code comments in ArrayBinaryTree * Roll back time_comlexity.py * Add the visualizing code(pythontutor) blocks to the chapter complexity, data structure, array and linked list, stack and queue, hash table, and backtracking * Fix the code comments
This commit is contained in:
@ -84,7 +84,7 @@ func (l *myList) remove(index int) int {
|
||||
panic("索引越界")
|
||||
}
|
||||
num := l.arr[index]
|
||||
// 索引 i 之后的元素都向前移动一位
|
||||
// 将索引 index 之后的元素都向前移动一位
|
||||
for j := index; j < l.arrSize-1; j++ {
|
||||
l.arr[j] = l.arr[j+1]
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ func newArrayBinaryTree(arr []any) *arrayBinaryTree {
|
||||
}
|
||||
}
|
||||
|
||||
/* 节点数量 */
|
||||
/* 列表容量 */
|
||||
func (abt *arrayBinaryTree) size() int {
|
||||
return len(abt.tree)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user