mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-06 14:27:26 +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:
@ -81,7 +81,7 @@ class MyList {
|
||||
if (index < 0 || index >= size())
|
||||
throw out_of_range("索引越界");
|
||||
int num = arr[index];
|
||||
// 索引 i 之后的元素都向前移动一位
|
||||
// 将索引 index 之后的元素都向前移动一位
|
||||
for (int j = index; j < size() - 1; j++) {
|
||||
arr[j] = arr[j + 1];
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class ArrayBinaryTree {
|
||||
tree = arr;
|
||||
}
|
||||
|
||||
/* 节点数量 */
|
||||
/* 列表容量 */
|
||||
int size() {
|
||||
return tree.size();
|
||||
}
|
||||
|
Reference in New Issue
Block a user