1. Add array representation of binary tree.

2. Update the LEGO example.
3. Update headers of the Python files.
This commit is contained in:
Yudong Jin
2022-12-23 00:44:40 +08:00
parent 9015222a0b
commit 919236f479
36 changed files with 151 additions and 61 deletions

View File

@ -1,8 +1,8 @@
'''
"""
File: array.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: linked_list.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: list.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: my_list.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: leetcode_two_sum.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: space_complexity.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: time_complexity.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: worst_best_time_complexity.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: binary_search.py
Created Time: 2022-11-26
Author: timi (xisunyy@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: hashing_search.py
Created Time: 2022-11-26
Author: timi (xisunyy@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: linear_search.py
Created Time: 2022-11-26
Author: timi (xisunyy@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: bubble_sort.py
Created Time: 2022-11-25
Author: timi (xisunyy@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: insertion_sort.py
Created Time: 2022-11-25
Author: timi (xisunyy@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: merge_sort.py
Created Time: 2022-11-25
Author: timi (xisunyy@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: quick_sort.py
Created Time: 2022-11-25
Author: timi (xisunyy@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: array_queue.py
Created Time: 2022-12-01
Author: Peng Chen (pengchzn@gmail.com)
'''
"""
import os.path as osp
import sys

View File

@ -1,8 +1,8 @@
'''
"""
File: array_stack.py
Created Time: 2022-11-29
Author: Peng Chen (pengchzn@gmail.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: deque.py
Created Time: 2022-11-29
Author: Peng Chen (pengchzn@gmail.com)
'''
"""
import os.path as osp
import sys

View File

@ -1,8 +1,8 @@
'''
"""
File: linkedlist_queue.py
Created Time: 2022-12-01
Author: Peng Chen (pengchzn@gmail.com)
'''
"""
import os.path as osp
import sys

View File

@ -1,8 +1,8 @@
'''
"""
File: linkedlist_stack.py
Created Time: 2022-11-29
Author: Peng Chen (pengchzn@gmail.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: queue.py
Created Time: 2022-11-29
Author: Peng Chen (pengchzn@gmail.com)
'''
"""
import os.path as osp
import sys

View File

@ -1,8 +1,8 @@
'''
"""
File: stack.py
Created Time: 2022-11-29
Author: Peng Chen (pengchzn@gmail.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: binary_search_tree.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: binary_tree.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: binary_tree_bfs.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: binary_tree_dfs.py
Created Time: 2022-11-25
Author: Krahets (krahets@163.com)
'''
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))

View File

@ -1,8 +1,8 @@
'''
"""
File: binary_tree.py
Created Time: 2021-12-11
Author: Krahets (krahets@163.com)
'''
"""
import collections

View File

@ -1,8 +1,8 @@
'''
"""
File: linked_list.py
Created Time: 2021-12-11
Author: Krahets (krahets@163.com)
'''
"""
class ListNode:
"""Definition for a singly-linked list node

View File

@ -1,8 +1,8 @@
'''
"""
File: print_util.py
Created Time: 2021-12-11
Author: Krahets (krahets@163.com), msk397 (machangxinq@gmail.com)
'''
"""
import copy
import queue