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:
Yudong Jin
2024-01-07 04:04:01 +08:00
committed by GitHub
parent 0f5b924036
commit ddd375af20
61 changed files with 434 additions and 40 deletions

View File

@ -61,7 +61,7 @@ class MyList {
int remove(int index) {
if (index >= _size) throw RangeError('索引越界');
int _num = _arr[index];
// 将索引 index 之后的元素都向前移动一位
// 将索引 index 之后的元素都向前移动一位
for (var j = index; j < _size - 1; j++) {
_arr[j] = _arr[j + 1];
}

View File

@ -14,7 +14,7 @@ class ArrayBinaryTree {
/* 构造方法 */
ArrayBinaryTree(this._tree);
/* 节点数量 */
/* 列表容量 */
int size() {
return _tree.length;
}