Skip to content

Commit

Permalink
feat: Add visualizing code blocks based on the pythontutor (#1029)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
krahets committed Jan 6, 2024
1 parent 0f5b924 commit ddd375a
Show file tree
Hide file tree
Showing 61 changed files with 434 additions and 40 deletions.
2 changes: 1 addition & 1 deletion codes/c/chapter_tree/array_binary_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void delArrayBinaryTree(ArrayBinaryTree *abt) {
free(abt);
}

/* 节点数量 */
/* 列表容量 */
int size(ArrayBinaryTree *abt) {
return abt->size;
}
Expand Down
2 changes: 1 addition & 1 deletion codes/cpp/chapter_array_and_linkedlist/my_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
2 changes: 1 addition & 1 deletion codes/cpp/chapter_tree/array_binary_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ArrayBinaryTree {
tree = arr;
}

/* 节点数量 */
/* 列表容量 */
int size() {
return tree.size();
}
Expand Down
2 changes: 1 addition & 1 deletion codes/csharp/chapter_array_and_linkedlist/my_list.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class MyList {
if (index < 0 || index >= arrSize)
throw new IndexOutOfRangeException("索引越界");
int num = arr[index];
// 将索引 index 之后的元素都向前移动一位
// 将将索引 index 之后的元素都向前移动一位
for (int j = index; j < arrSize - 1; j++) {
arr[j] = arr[j + 1];
}
Expand Down
2 changes: 1 addition & 1 deletion codes/csharp/chapter_tree/array_binary_tree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace hello_algo.chapter_tree;
public class ArrayBinaryTree(List<int?> arr) {
List<int?> tree = new(arr);

/* 节点数量 */
/* 列表容量 */
public int Size() {
return tree.Count;
}
Expand Down
2 changes: 1 addition & 1 deletion codes/dart/chapter_array_and_linkedlist/my_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
2 changes: 1 addition & 1 deletion codes/dart/chapter_tree/array_binary_tree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ArrayBinaryTree {
/* 构造方法 */
ArrayBinaryTree(this._tree);

/* 节点数量 */
/* 列表容量 */
int size() {
return _tree.length;
}
Expand Down
2 changes: 1 addition & 1 deletion codes/go/chapter_array_and_linkedlist/my_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down
2 changes: 1 addition & 1 deletion codes/go/chapter_tree/array_binary_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func newArrayBinaryTree(arr []any) *arrayBinaryTree {
}
}

/* 节点数量 */
/* 列表容量 */
func (abt *arrayBinaryTree) size() int {
return len(abt.tree)
}
Expand Down
2 changes: 1 addition & 1 deletion codes/java/chapter_array_and_linkedlist/my_list.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public int remove(int index) {
if (index < 0 || index >= size)
throw new IndexOutOfBoundsException("索引越界");
int num = arr[index];
// 将索引 index 之后的元素都向前移动一位
// 将将索引 index 之后的元素都向前移动一位
for (int j = index; j < size - 1; j++) {
arr[j] = arr[j + 1];
}
Expand Down
2 changes: 1 addition & 1 deletion codes/java/chapter_tree/array_binary_tree.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public ArrayBinaryTree(List<Integer> arr) {
tree = new ArrayList<>(arr);
}

/* 节点数量 */
/* 列表容量 */
public int size() {
return tree.size();
}
Expand Down
2 changes: 1 addition & 1 deletion codes/javascript/chapter_array_and_linkedlist/my_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class MyList {
remove(index) {
if (index < 0 || index >= this.#size) throw new Error('索引越界');
let num = this.#arr[index];
// 将索引 index 之后的元素都向前移动一位
// 将将索引 index 之后的元素都向前移动一位
for (let j = index; j < this.#size - 1; j++) {
this.#arr[j] = this.#arr[j + 1];
}
Expand Down
2 changes: 1 addition & 1 deletion codes/javascript/chapter_tree/array_binary_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ArrayBinaryTree {
this.#tree = arr;
}

/* 节点数量 */
/* 列表容量 */
size() {
return this.#tree.length;
}
Expand Down
2 changes: 1 addition & 1 deletion codes/python/chapter_array_and_linkedlist/my_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def remove(self, index: int) -> int:
if index < 0 or index >= self._size:
raise IndexError("索引越界")
num = self._arr[index]
# 索引 i 之后的元素都向前移动一位
# 将索引 index 之后的元素都向前移动一位
for j in range(index, self._size - 1):
self._arr[j] = self._arr[j + 1]
# 更新元素数量
Expand Down
2 changes: 1 addition & 1 deletion codes/python/chapter_tree/array_binary_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, arr: list[int | None]):
self._tree = list(arr)

def size(self):
"""节点数量"""
"""列表容量"""
return len(self._tree)

def val(self, i: int) -> int:
Expand Down
1 change: 0 additions & 1 deletion codes/python/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
ListNode,
list_to_linked_list,
linked_list_to_list,
get_list_node,
)
from .tree_node import TreeNode, list_to_tree, tree_to_list
from .vertex import Vertex, vals_to_vets, vets_to_vals
Expand Down
13 changes: 3 additions & 10 deletions codes/python/modules/list_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@


class ListNode:
"""Definition for a singly-linked list node"""
"""链表节点类"""

def __init__(self, val: int):
self.val: int = val # 节点值
self.next: ListNode | None = None # 后继节点引用


def list_to_linked_list(arr: list[int]) -> ListNode | None:
"""Generate a linked list with a list"""
"""将列表序列化为链表"""
dum = head = ListNode(0)
for a in arr:
node = ListNode(a)
Expand All @@ -24,16 +24,9 @@ def list_to_linked_list(arr: list[int]) -> ListNode | None:


def linked_list_to_list(head: ListNode | None) -> list[int]:
"""Serialize a linked list into an array"""
"""将链表反序列化为列表"""
arr: list[int] = []
while head:
arr.append(head.val)
head = head.next
return arr


def get_list_node(head: ListNode | None, val: int) -> ListNode | None:
"""Get a list node with specific value from a linked list"""
while head and head.val != val:
head = head.next
return head
10 changes: 5 additions & 5 deletions codes/python/modules/print_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@


def print_matrix(mat: list[list[int]]):
"""Print a matrix"""
"""打印矩阵"""
s = []
for arr in mat:
s.append(" " + str(arr))
print("[\n" + ",\n".join(s) + "\n]")


def print_linked_list(head: ListNode | None):
"""Print a linked list"""
"""打印链表"""
arr: list[int] = linked_list_to_list(head)
print(" -> ".join([str(a) for a in arr]))

Expand All @@ -39,7 +39,7 @@ def print_tree(
root: TreeNode | None, prev: Trunk | None = None, is_right: bool = False
):
"""
Print a binary tree
打印二叉树
This tree printer is borrowed from TECHIE DELIGHT
https://www.techiedelight.com/c-program-print-binary-tree/
"""
Expand Down Expand Up @@ -68,13 +68,13 @@ def print_tree(


def print_dict(hmap: dict):
"""Print a dict"""
"""打印字典"""
for key, value in hmap.items():
print(key, "->", value)


def print_heap(heap: list[int]):
"""Print a heap both in array and tree representations"""
"""打印堆"""
print("堆的数组表示:", heap)
print("堆的树状表示:")
root: TreeNode | None = list_to_tree(heap)
Expand Down
23 changes: 23 additions & 0 deletions codes/pythontutor/chapter_array_and_linkedlist/array.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
File: array.md
Created Time: 2024-01-05
Author: Krahets (krahets@163.com)
--->

<!-- [file]{array}-[class]{}-[func]{random_access} -->
https://pythontutor.com/render.html#code=import%20random%0A%0Adef%20random_access%28nums%3A%20list%5Bint%5D%29%20-%3E%20int%3A%0A%20%20%20%20%22%22%22%E9%9A%8F%E6%9C%BA%E8%AE%BF%E9%97%AE%E5%85%83%E7%B4%A0%22%22%22%0A%20%20%20%20%23%20%E5%9C%A8%E5%8C%BA%E9%97%B4%20%5B0,%20len%28nums%29-1%5D%20%E4%B8%AD%E9%9A%8F%E6%9C%BA%E6%8A%BD%E5%8F%96%E4%B8%80%E4%B8%AA%E6%95%B0%E5%AD%97%0A%20%20%20%20random_index%20%3D%20random.randint%280,%20len%28nums%29%20-%201%29%0A%20%20%20%20%23%20%E8%8E%B7%E5%8F%96%E5%B9%B6%E8%BF%94%E5%9B%9E%E9%9A%8F%E6%9C%BA%E5%85%83%E7%B4%A0%0A%20%20%20%20random_num%20%3D%20nums%5Brandom_index%5D%0A%20%20%20%20return%20random_num%0A%0A%22%22%22Driver%20Code%22%22%22%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20%23%20%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E7%BB%84%0A%20%20%20%20nums%20%3D%20%5B1,%203,%202,%205,%204%5D%0A%20%20%20%20print%28%22%E6%95%B0%E7%BB%84%20nums%20%3D%22,%20nums%29%0A%0A%20%20%20%20%23%20%E9%9A%8F%E6%9C%BA%E8%AE%BF%E9%97%AE%0A%20%20%20%20random_num%3A%20int%20%3D%20random_access%28nums%29%0A%20%20%20%20print%28%22%E5%9C%A8%20nums%20%E4%B8%AD%E8%8E%B7%E5%8F%96%E9%9A%8F%E6%9C%BA%E5%85%83%E7%B4%A0%22,%20random_num%29%0A&cumulative=false&curInstr=7&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false

<!-- [file]{array}-[class]{}-[func]{insert} -->
https://pythontutor.com/render.html#code=def%20insert%28nums%3A%20list%5Bint%5D,%20num%3A%20int,%20index%3A%20int%29%3A%0A%20%20%20%20%22%22%22%E5%9C%A8%E6%95%B0%E7%BB%84%E7%9A%84%E7%B4%A2%E5%BC%95%20index%20%E5%A4%84%E6%8F%92%E5%85%A5%E5%85%83%E7%B4%A0%20num%22%22%22%0A%20%20%20%20%23%20%E6%8A%8A%E7%B4%A2%E5%BC%95%20index%20%E4%BB%A5%E5%8F%8A%E4%B9%8B%E5%90%8E%E7%9A%84%E6%89%80%E6%9C%89%E5%85%83%E7%B4%A0%E5%90%91%E5%90%8E%E7%A7%BB%E5%8A%A8%E4%B8%80%E4%BD%8D%0A%20%20%20%20for%20i%20in%20range%28len%28nums%29%20-%201,%20index,%20-1%29%3A%0A%20%20%20%20%20%20%20%20nums%5Bi%5D%20%3D%20nums%5Bi%20-%201%5D%0A%20%20%20%20%23%20%E5%B0%86%20num%20%E8%B5%8B%E7%BB%99%20index%20%E5%A4%84%E7%9A%84%E5%85%83%E7%B4%A0%0A%20%20%20%20nums%5Bindex%5D%20%3D%20num%0A%0A%22%22%22Driver%20Code%22%22%22%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20%23%20%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E7%BB%84%0A%20%20%20%20nums%20%3D%20%5B1,%203,%202,%205,%204%5D%0A%20%20%20%20print%28%22%E6%95%B0%E7%BB%84%20nums%20%3D%22,%20nums%29%0A%0A%20%20%20%20%23%20%E6%8F%92%E5%85%A5%E5%85%83%E7%B4%A0%0A%20%20%20%20insert%28nums,%206,%203%29%0A%20%20%20%20print%28%22%E5%9C%A8%E7%B4%A2%E5%BC%95%203%20%E5%A4%84%E6%8F%92%E5%85%A5%E6%95%B0%E5%AD%97%206%20%EF%BC%8C%E5%BE%97%E5%88%B0%20nums%20%3D%22,%20nums%29&cumulative=false&curInstr=6&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false

<!-- [file]{array}-[class]{}-[func]{remove} -->
https://pythontutor.com/render.html#code=def%20remove%28nums%3A%20list%5Bint%5D,%20index%3A%20int%29%3A%0A%20%20%20%20%22%22%22%E5%88%A0%E9%99%A4%E7%B4%A2%E5%BC%95%20index%20%E5%A4%84%E7%9A%84%E5%85%83%E7%B4%A0%22%22%22%0A%20%20%20%20%23%20%E6%8A%8A%E7%B4%A2%E5%BC%95%20index%20%E4%B9%8B%E5%90%8E%E7%9A%84%E6%89%80%E6%9C%89%E5%85%83%E7%B4%A0%E5%90%91%E5%89%8D%E7%A7%BB%E5%8A%A8%E4%B8%80%E4%BD%8D%0A%20%20%20%20for%20i%20in%20range%28index,%20len%28nums%29%20-%201%29%3A%0A%20%20%20%20%20%20%20%20nums%5Bi%5D%20%3D%20nums%5Bi%20%2B%201%5D%0A%0A%22%22%22Driver%20Code%22%22%22%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20%23%20%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E7%BB%84%0A%20%20%20%20nums%20%3D%20%5B1,%203,%202,%205,%204%5D%0A%20%20%20%20print%28%22%E6%95%B0%E7%BB%84%20nums%20%3D%22,%20nums%29%0A%0A%20%20%20%20%23%20%E5%88%A0%E9%99%A4%E5%85%83%E7%B4%A0%0A%20%20%20%20remove%28nums,%202%29%0A%20%20%20%20print%28%22%E5%88%A0%E9%99%A4%E7%B4%A2%E5%BC%95%202%20%E5%A4%84%E7%9A%84%E5%85%83%E7%B4%A0%EF%BC%8C%E5%BE%97%E5%88%B0%20nums%20%3D%22,%20nums%29&cumulative=false&curInstr=6&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false

<!-- [file]{array}-[class]{}-[func]{traverse} -->
https://pythontutor.com/render.html#code=def%20traverse%28nums%3A%20list%5Bint%5D%29%3A%0A%20%20%20%20%22%22%22%E9%81%8D%E5%8E%86%E6%95%B0%E7%BB%84%22%22%22%0A%20%20%20%20count%20%3D%200%0A%20%20%20%20%23%20%E9%80%9A%E8%BF%87%E7%B4%A2%E5%BC%95%E9%81%8D%E5%8E%86%E6%95%B0%E7%BB%84%0A%20%20%20%20for%20i%20in%20range%28len%28nums%29%29%3A%0A%20%20%20%20%20%20%20%20count%20%2B%3D%20nums%5Bi%5D%0A%20%20%20%20%23%20%E7%9B%B4%E6%8E%A5%E9%81%8D%E5%8E%86%E6%95%B0%E7%BB%84%E5%85%83%E7%B4%A0%0A%20%20%20%20for%20num%20in%20nums%3A%0A%20%20%20%20%20%20%20%20count%20%2B%3D%20num%0A%20%20%20%20%23%20%E5%90%8C%E6%97%B6%E9%81%8D%E5%8E%86%E6%95%B0%E6%8D%AE%E7%B4%A2%E5%BC%95%E5%92%8C%E5%85%83%E7%B4%A0%0A%20%20%20%20for%20i,%20num%20in%20enumerate%28nums%29%3A%0A%20%20%20%20%20%20%20%20count%20%2B%3D%20nums%5Bi%5D%0A%20%20%20%20%20%20%20%20count%20%2B%3D%20num%0A%0A%22%22%22Driver%20Code%22%22%22%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20%23%20%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E7%BB%84%0A%20%20%20%20nums%20%3D%20%5B1,%203,%202,%205,%204%5D%0A%20%20%20%20print%28%22%E6%95%B0%E7%BB%84%20nums%20%3D%22,%20nums%29%0A%0A%20%20%20%20%23%20%E9%81%8D%E5%8E%86%E6%95%B0%E7%BB%84%0A%20%20%20%20traverse%28nums%29&cumulative=false&curInstr=6&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false

<!-- [file]{array}-[class]{}-[func]{find} -->
https://pythontutor.com/render.html#code=def%20find%28nums%3A%20list%5Bint%5D,%20target%3A%20int%29%20-%3E%20int%3A%0A%20%20%20%20%22%22%22%E5%9C%A8%E6%95%B0%E7%BB%84%E4%B8%AD%E6%9F%A5%E6%89%BE%E6%8C%87%E5%AE%9A%E5%85%83%E7%B4%A0%22%22%22%0A%20%20%20%20for%20i%20in%20range%28len%28nums%29%29%3A%0A%20%20%20%20%20%20%20%20if%20nums%5Bi%5D%20%3D%3D%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20i%0A%20%20%20%20return%20-1%0A%0A%22%22%22Driver%20Code%22%22%22%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20%23%20%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E7%BB%84%0A%20%20%20%20nums%20%3D%20%5B1,%203,%202,%205,%204%5D%0A%20%20%20%20print%28%22%E6%95%B0%E7%BB%84%20nums%20%3D%22,%20nums%29%0A%0A%20%20%20%20%23%20%E6%9F%A5%E6%89%BE%E5%85%83%E7%B4%A0%0A%20%20%20%20index%3A%20int%20%3D%20find%28nums,%203%29%0A%20%20%20%20print%28%22%E5%9C%A8%20nums%20%E4%B8%AD%E6%9F%A5%E6%89%BE%E5%85%83%E7%B4%A0%203%20%EF%BC%8C%E5%BE%97%E5%88%B0%E7%B4%A2%E5%BC%95%20%3D%22,%20index%29&cumulative=false&curInstr=6&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false

<!-- [file]{array}-[class]{}-[func]{extend} -->
https://pythontutor.com/render.html#code=%23%20%E8%AF%B7%E6%B3%A8%E6%84%8F%EF%BC%8CPython%20%E7%9A%84%20list%20%E6%98%AF%E5%8A%A8%E6%80%81%E6%95%B0%E7%BB%84%EF%BC%8C%E5%8F%AF%E4%BB%A5%E7%9B%B4%E6%8E%A5%E6%89%A9%E5%B1%95%0A%23%20%E4%B8%BA%E4%BA%86%E6%96%B9%E4%BE%BF%E5%AD%A6%E4%B9%A0%EF%BC%8C%E6%9C%AC%E5%87%BD%E6%95%B0%E5%B0%86%20list%20%E7%9C%8B%E4%BD%9C%E9%95%BF%E5%BA%A6%E4%B8%8D%E5%8F%AF%E5%8F%98%E7%9A%84%E6%95%B0%E7%BB%84%0Adef%20extend%28nums%3A%20list%5Bint%5D,%20enlarge%3A%20int%29%20-%3E%20list%5Bint%5D%3A%0A%20%20%20%20%22%22%22%E6%89%A9%E5%B1%95%E6%95%B0%E7%BB%84%E9%95%BF%E5%BA%A6%22%22%22%0A%20%20%20%20%23%20%E5%88%9D%E5%A7%8B%E5%8C%96%E4%B8%80%E4%B8%AA%E6%89%A9%E5%B1%95%E9%95%BF%E5%BA%A6%E5%90%8E%E7%9A%84%E6%95%B0%E7%BB%84%0A%20%20%20%20res%20%3D%20%5B0%5D%20*%20%28len%28nums%29%20%2B%20enlarge%29%0A%20%20%20%20%23%20%E5%B0%86%E5%8E%9F%E6%95%B0%E7%BB%84%E4%B8%AD%E7%9A%84%E6%89%80%E6%9C%89%E5%85%83%E7%B4%A0%E5%A4%8D%E5%88%B6%E5%88%B0%E6%96%B0%E6%95%B0%E7%BB%84%0A%20%20%20%20for%20i%20in%20range%28len%28nums%29%29%3A%0A%20%20%20%20%20%20%20%20res%5Bi%5D%20%3D%20nums%5Bi%5D%0A%20%20%20%20%23%20%E8%BF%94%E5%9B%9E%E6%89%A9%E5%B1%95%E5%90%8E%E7%9A%84%E6%96%B0%E6%95%B0%E7%BB%84%0A%20%20%20%20return%20res%0A%0A%22%22%22Driver%20Code%22%22%22%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20%23%20%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E7%BB%84%0A%20%20%20%20nums%20%3D%20%5B1,%203,%202,%205,%204%5D%0A%20%20%20%20print%28%22%E6%95%B0%E7%BB%84%20nums%20%3D%22,%20nums%29%0A%0A%20%20%20%20%23%20%E9%95%BF%E5%BA%A6%E6%89%A9%E5%B1%95%0A%20%20%20%20nums%20%3D%20extend%28nums,%203%29%0A%20%20%20%20print%28%22%E5%B0%86%E6%95%B0%E7%BB%84%E9%95%BF%E5%BA%A6%E6%89%A9%E5%B1%95%E8%87%B3%208%20%EF%BC%8C%E5%BE%97%E5%88%B0%20nums%20%3D%22,%20nums%29&cumulative=false&curInstr=3&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false
Loading

0 comments on commit ddd375a

Please sign in to comment.