diff --git a/.gitignore b/.gitignore
index a94212f..c88077a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,123 @@
*.opendb
*.json
*.sqlite
+*.ipch
+.idea
+
+# 20181212 排骨
+# -------------------
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index 15a15b2..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/learning-algorithm.iml b/.idea/learning-algorithm.iml
deleted file mode 100644
index f3d7bc9..0000000
--- a/.idea/learning-algorithm.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 8656114..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 3627932..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index d2a73e8..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,362 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- DEFINITION_ORDER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1543997006208
-
-
- 1543997006208
-
-
- 1544177157562
-
-
-
- 1544177157562
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Archer/lengthOfLongestSubstring/20181211-lengthOfLongestSubstring-Archer.py b/Archer/lengthOfLongestSubstring/20181211-lengthOfLongestSubstring-Archer.py
new file mode 100644
index 0000000..3986e2b
--- /dev/null
+++ b/Archer/lengthOfLongestSubstring/20181211-lengthOfLongestSubstring-Archer.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+
+s = "vdlkdk"
+dict = {}
+num = 0
+out = 0
+flag = 0
+i = 0
+#暴力法1:找到所有不重复的字符串
+'''
+for i in range(0,len(s)) :
+ dict[s[i]] = i
+ num += 1
+ for j in range(i+1,len(s)) :
+ if s[j] in dict :
+ break
+ dict[s[j]] = j
+ num += 1
+ out = [num, out][out > num]
+ if out >= len(s) / 2 :
+ break
+ dict.clear()
+ num = 0
+'''
+
+#暴力法2:从输出长度out入手
+'''
+for out in range(0,len(s)):
+ for i in range(0,out+1):
+ for j in range(i,i+len(s)-out):
+ if s[j] in dict:
+ dict.clear()
+ break
+ dict[s[j]] = j
+ else:
+ flag = 1
+ if flag == 1:
+ break
+ if flag == 1:
+ break
+
+print len(s)-out
+'''
+#滑动法,当往右滑动到右重复字符时,从前面重复的那个字符后开始搜索,不断循环
+'''
+n = len(s)
+while i < n:
+ if s[i] in dict:
+ i = dict[s[i]] + 1
+ out = [num, out][out > num]
+ num = 0
+ dict.clear()
+ dict[s[i]] = i
+ num += 1
+ i += 1
+ continue
+ dict[s[i]] = i
+ num += 1
+ i += 1
+out = [num, out][out > num]
+'''
+
diff --git "a/Archer/lengthOfLongestSubstring/lengthOfLongestSubstring\350\257\264\346\230\216.md" "b/Archer/lengthOfLongestSubstring/lengthOfLongestSubstring\350\257\264\346\230\216.md"
new file mode 100644
index 0000000..71da795
--- /dev/null
+++ "b/Archer/lengthOfLongestSubstring/lengthOfLongestSubstring\350\257\264\346\230\216.md"
@@ -0,0 +1,13 @@
+# 算法实现:(详细见代码文档) #
+
+# 给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。 #
+
+#思路#
+1.从i=0至n-1,j=i+1至n-1,为索引,找全部适合的子字符串,然后得到答案
+2、输出长度out从n到1,不断在数组中滑动,找到最大的没有重复的子字符串。
+3、在i为0至n-1的过程中不断重建字典
+
+
+# 复盘 #
+
+应该还可以改进另一种算法,更简洁
\ No newline at end of file
diff --git a/Archer/readme.md b/Archer/readme.md
index 75494ce..1c49ef1 100644
--- a/Archer/readme.md
+++ b/Archer/readme.md
@@ -1,5 +1,10 @@
+##1210-1212 打卡##
+**给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。**
+
+##1206-1208 打卡##
+**给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。您可以假设除了数字 0 之外,这两个数都不会以 0 开头。**
+
##1203-1205打卡 ##
**双数之和的一个查找,只实现了最简单的方式,但是,哈希表的解决方案还未完善,没有解决哈希冲突。**
-##1206-1208 打卡##
-**给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。您可以假设除了数字 0 之外,这两个数都不会以 0 开头。**
\ No newline at end of file
+
\ No newline at end of file
diff --git a/LeafScar/binary_tree_level_order_traversal/binary_tree_level_order_traversal.cpp b/LeafScar/binary_tree_level_order_traversal/binary_tree_level_order_traversal.cpp
new file mode 100644
index 0000000..1157551
--- /dev/null
+++ b/LeafScar/binary_tree_level_order_traversal/binary_tree_level_order_traversal.cpp
@@ -0,0 +1,96 @@
+/*
+ * .Կɹȱ
+ * һ
+ *
+ * 3
+ * / \
+ * 9 20
+ * / \
+ * 15 7
+ * Ӹڵ㿪ʼΪǰڵ
+ * Ƕеȳʾ
+ *
+ * гʼڵ
+ * (1) 3
+ * ʱǰڵӣǰڵ˳
+ * ˳
+ * (2) |20 9| 3() 3
+ * (3) |20| 9() 9
+ * (4) |7 15| 20() 20
+ * (5) |7| 15() 15
+ * (6) || 7() 7
+ *
+ * 㷨Եʽʵ
+ * 1.ǰڵ㸳ֵΪӶڵ㲢
+ * 2.ǰڵ
+ * 3.ǰڵ
+ *
+ * .ÿζһڵ˳꣬˳Ӹòڵӽڵ㣬˳
+ * еصȳ
+ *
+ *
+ * .ֻܰ˳ηʣȴֲ㣬ܴﵽĿ
+ * ʣҪÿһһڵ㣬ʵʱһķʣpushؽ
+ *
+ * С: Եòһڵʱ
+ * ͬʱὫһڵӣ
+ * һڵһһڵ㣬
+ * ɻñǽڵ
+ *
+ * ͨñǽڵֲãÿε
+ */
+#include
+#include
+using namespace std;
+
+struct TreeNode {
+ int val;
+ TreeNode* left;
+ TreeNode* right;
+ TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
+};
+
+class Solution {
+public:
+ vector> levelOrder(TreeNode* root) {
+ vector> rel;
+
+ if (root == nullptr)
+ return rel;
+
+ queue tempQueue;
+
+ tempQueue.push(root);
+ TreeNode* lastNode = root; // ¼ǰһԪأһ˳һڵ㣬pushеһ
+ TreeNode* lastNodeSign = root; // 洢һһڵ
+ vector levelInt;
+ while (!tempQueue.empty())
+ {
+ TreeNode* x = tempQueue.front();
+ tempQueue.pop();
+
+ levelInt.push_back(x->val); // 洢Ԫصֵ
+
+ if (x->left != nullptr)
+ {
+ tempQueue.push(x->left); // 뵱ǰڵ
+ lastNodeSign = x->left; // 뵱ǰڵӺΪһһڵ
+ }
+
+ if (x->right != nullptr)
+ {
+ tempQueue.push(x->right); // 뵱ǰڵ
+ lastNodeSign = x->right; // һһڵΪ
+ }
+
+ if (x == lastNode) // ʵǰһԪʱ
+ {
+ lastNode = lastNodeSign; // lastNodeΪһһԪ
+ rel.push_back(levelInt); // levelIntѾǰֵ뷵ؽ
+ levelInt.clear(); // levelInt¼һֵ
+ }
+ }
+
+ return rel;
+ }
+};
diff --git a/LeafScar/binary_tree_level_order_traversal/readme.md b/LeafScar/binary_tree_level_order_traversal/readme.md
new file mode 100644
index 0000000..516cbad
--- /dev/null
+++ b/LeafScar/binary_tree_level_order_traversal/readme.md
@@ -0,0 +1 @@
+### ˼·ҳ
\ No newline at end of file
diff --git a/LeafScar/readme.md b/LeafScar/readme.md
index 01b15fb..bfdbe6c 100644
--- a/LeafScar/readme.md
+++ b/LeafScar/readme.md
@@ -1,5 +1,7 @@
# LeafScar贡献内容
+1.最长公共子序列
+2.情感丰富的文字
-1.最长公共子序列
\ No newline at end of file
+3.二叉树的层次遍历
\ No newline at end of file
diff --git a/Spareribs/0021 merge_two_sorted_lists/Readme.md b/Spareribs/0021 merge_two_sorted_lists/Readme.md
new file mode 100644
index 0000000..1894329
--- /dev/null
+++ b/Spareribs/0021 merge_two_sorted_lists/Readme.md
@@ -0,0 +1,91 @@
+**目录**
+- `题目: 合并两个有序链表`
+- `参考答案`
+ - `方案1 遍历法`
+- `问题`
+
+
+
+
+# 题目:合并两个有序链表 Merge Two Sorted Lists
+将两个有序链表合并为一个新的有序链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。
+```
+示例:
+输入:1->2->4, 1->3->4
+输出:1->1->2->3->4->4
+```
+
+
+
+# 参考答案
+
+a href="#fa1">
+
+## 方案1 遍历法
+### 【思路】
+定义一个结果链表,判断两个链表中的数据大小,将结果存入结果链表中
+### 【实现】
+```python
+# Definition for singly-linked list.
+# class ListNode:
+# def __init__(self, x):
+# self.val = x
+# self.next = None
+
+class Solution:
+ def mergeTwoLists(self, l1, l2):
+ """
+ :type l1: ListNode
+ :type l2: ListNode
+ :rtype: ListNode
+ """
+ result = ListNode(0)
+ head = result # 神操作
+
+ # 确认 l1 和 l2 为空的场景, 直接返回
+ if l1 == None and l2 == None:
+ return None
+ elif l1 == None:
+ return l2
+ elif l2 == None:
+ return l1
+
+ while True:
+ # 比较 l1 和 l2 数据的大小
+ if l1.val < l2.val:
+ head.val = l1.val
+ l1 = l1.next
+ if l1 == None:
+ head.next = l2
+ break
+ head.next = ListNode(0)
+ head = head.next
+ else:
+ head.val = l2.val
+ l2 = l2.next
+ if l2 == None:
+ head.next = l1
+ break
+ head.next = ListNode(0)
+ head = head.next
+ return result
+```
+### 【分析】
+时间复杂度:假设一个是$n$个元素,对链表进行遍历($n$),最终链接所有元素($n+n$)
+
+空间复杂度:因为需要一个数组,所以需要额外的空间。这个空间的大小就是链表元素的个数 $O(n)$
+
+# 遇到的问题
+1. ListNode这种资源的操作的方法
+```
+# 获取 head.val 中的数据,此时的值为 0
+head = ListNode(0)
+head.val
+# 让 head的 next 也成为 ListNode 对象,值也为0
+head.next = ListNode(0)
+head = head.next
+```
+3. head = result 这样的神操作,在不改变原有数据的情况下,操作 result 中的 next 的数据
+
+-----------------------------
+欢迎提问,每天晚上都会定期回复~~
\ No newline at end of file
diff --git a/Spareribs/0023 merge_k_Sorted_lists/Readme.md b/Spareribs/0023 merge_k_Sorted_lists/Readme.md
new file mode 100644
index 0000000..880ccd2
--- /dev/null
+++ b/Spareribs/0023 merge_k_Sorted_lists/Readme.md
@@ -0,0 +1,82 @@
+**目录**
+- `题目: 合并K个排序链表`
+- `参考答案`
+ - `方案1 遍历法`
+- `问题`
+
+
+
+# 题目: 合并K个排序链表
+
+合并 k 个排序链表,返回合并后的排序链表。请分析和描述算法的复杂度。
+示例:
+```
+输入:
+[
+ 1->4->5,
+ 1->3->4,
+ 2->6
+]
+输出: 1->1->2->3->4->4->5->6
+```
+
+
+# 参考答案
+
+
+
+## 方案1 遍历法
+### 【思路】
+遍历 lists 中所有ListNode()数据,排序后创建链表。
+### 【实现】
+```python
+# Definition for singly-linked list.
+# class ListNode:
+# def __init__(self, x):
+# self.val = x
+# self.next = None
+
+class Solution:
+ def mergeKLists(self, lists):
+ """
+ :type lists: List[ListNode]
+ :rtype: ListNode
+ """
+ # 将所有的数存入一个空列表中
+ _nums = []
+ for _listnode in lists:
+ while _listnode:
+ _nums.append(_listnode.val)
+ _listnode = _listnode.next
+
+ # 如果列表为空, 直接返回
+ if _nums == []:
+ return []
+
+ # 对数据进行排序
+ _nums.sort()
+ print(_nums)
+
+ # 将结果整理到ListNode中
+ res = ListNode(0)
+ answer = res
+ for _num in _nums:
+ res.next = ListNode(0)
+ res = res.next
+ res.val =_num
+
+ # 需要去掉链表中第一个值
+ return answer.next
+```
+### 【分析】
+时间复杂度:假设一个是$n$个元素,对链表进行遍历($n$),对数组进行排序(排序算法可以达到$nlogn$),最终链接所有元素($n$),就是 ( $n+nlogn+n$),也就是 $O(nlogn)$
+
+空间复杂度:因为需要一个数组,所以需要额外的空间。这个空间的大小就是链表元素的个数 $O(n)$
+
+
+
+# 问题
+1. 需要总结一份ListNode(0) 这种结构的使用方式
+
+
+博客地址:[LeetCode刷题日记](https://blog.csdn.net/q370835062/column/info/30688) 欢迎关注,留言~~~
diff --git a/Spareribs/0053 merge_two_sorted_lists/Readme.md b/Spareribs/0053 maximums_subarray/Readme.md
similarity index 100%
rename from Spareribs/0053 merge_two_sorted_lists/Readme.md
rename to Spareribs/0053 maximums_subarray/Readme.md
diff --git a/Spareribs/readme.md b/Spareribs/readme.md
index c316253..904f23c 100644
--- a/Spareribs/readme.md
+++ b/Spareribs/readme.md
@@ -1,6 +1,14 @@
# Spareribs贡献日记
-## 难度简单
+## 简单
-53 最大子序和 merge_two_sorted_lists [点击跳转](https://github.com/guangcity/learning-algorithm/tree/master/Spareribs/0053%20merge_two_sorted_lists)
+0021 合并两个有序链表 0021 merge_two_sorted_lists [点击跳转](
+https://github.com/guangcity/learning-algorithm/tree/master/Spareribs/0021%merge_two_sorted_lists)
+0053 最大子序和 maximums_subarray [点击跳转](
+https://github.com/guangcity/learning-algorithm/tree/master/Spareribs/0053%maximums_subarray)
+
+
+## 困难
+0023 合并K个排序链表 merge_k_Sorted_lists [点击跳转](
+https://github.com/guangcity/learning-algorithm/tree/master/Spareribs/0023%merge_k_Sorted_lists)
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/levelsearch1/bfs1.py" "b/\345\205\211\345\237\216/levelsearch1/bfs1.py"
new file mode 100644
index 0000000..462e47e
--- /dev/null
+++ "b/\345\205\211\345\237\216/levelsearch1/bfs1.py"
@@ -0,0 +1,28 @@
+class Solution:
+ def levelOrder(self, root):
+ # write your code here
+ res = []
+
+ if root is None:
+ return res
+ queue = [root]
+ # 列表为空时,循环终止
+ while queue and len(queue) != 0:
+ # 使用列表存储同层节点
+ level_val = []
+ # 同层节点的个数
+ length = len(queue)
+ for i in range(length):
+ # 将同层节点依次出队
+ h = queue.pop(0)
+ if h.left:
+ # 左孩子入队
+ queue.append(h.left)
+ if h.right:
+ # 右孩子入队
+ queue.append(h.right)
+ level_val.append(h.val)
+ res.append(level_val)
+ return res
+
+
diff --git "a/\345\205\211\345\237\216/levelsearch1/bfs2.py" "b/\345\205\211\345\237\216/levelsearch1/bfs2.py"
new file mode 100644
index 0000000..8c54967
--- /dev/null
+++ "b/\345\205\211\345\237\216/levelsearch1/bfs2.py"
@@ -0,0 +1,20 @@
+class Solution:
+ def levelOrder(self, root):
+ # write your code here
+ res = []
+ if not root:
+ return []
+ res_list = []
+ root_list = [root]
+ while root_list and len(root_list)!=0:
+ val_list = []
+ level_list = []
+ for node in root_list:
+ val_list.append(node.val)
+ if node.left:
+ level_list.append(node.left)
+ if node.right:
+ level_list.append(node.right)
+ root_list = level_list
+ res_list.append(val_list)
+ return res_list
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/levelsearch1/collection.py" "b/\345\205\211\345\237\216/levelsearch1/collection.py"
new file mode 100644
index 0000000..762a431
--- /dev/null
+++ "b/\345\205\211\345\237\216/levelsearch1/collection.py"
@@ -0,0 +1,22 @@
+class Solution:
+ def levelOrder(self, root):
+ # write your code here
+ res = []
+ if not root:
+ return res
+ import collections
+ queue = collections.deque()
+ queue.append(root)
+ # visited = set(root)
+ while queue:
+ length = len(queue)
+ level_val = []
+ for _ in range(length):
+ node = queue.popleft()
+ level_val.append(node.val)
+ if node.left:
+ queue.append(node.left)
+ if node.right:
+ queue.append(node.right)
+ res.append(level_val)
+ return res
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/levelsearch1/dfs.py" "b/\345\205\211\345\237\216/levelsearch1/dfs.py"
new file mode 100644
index 0000000..de75175
--- /dev/null
+++ "b/\345\205\211\345\237\216/levelsearch1/dfs.py"
@@ -0,0 +1,15 @@
+class Solution:
+ def levelOrder(self, root):
+ if not root:
+ return []
+ self.result = []
+ self.dfs(root, 0)
+ return self.result
+ def dfs(self, root, level):
+ if len(self.result) < level + 1:
+ self.result.append([])
+ self.result[level].append(root.val)
+ if root.left:
+ self.dfs(root.left, level + 1)
+ if root.right:
+ self.dfs(root.right, level + 1)
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/levelsearch2/bfs1.py" "b/\345\205\211\345\237\216/levelsearch2/bfs1.py"
new file mode 100644
index 0000000..76ebf85
--- /dev/null
+++ "b/\345\205\211\345\237\216/levelsearch2/bfs1.py"
@@ -0,0 +1,29 @@
+class Solution:
+ def levelOrderBottom(self, root):
+ """
+ :type root: TreeNode
+ :rtype: List[List[int]]
+ """
+ res = []
+
+ if root is None:
+ return res
+ queue = [root]
+ # 列表为空时,循环终止
+ while queue and len(queue) != 0:
+ # 使用列表存储同层节点
+ level_val = []
+ # 同层节点的个数
+ length = len(queue)
+ for i in range(length):
+ # 将同层节点依次出队
+ h = queue.pop(0)
+ if h.left:
+ # 左孩子入队
+ queue.append(h.left)
+ if h.right:
+ # 右孩子入队
+ queue.append(h.right)
+ level_val.append(h.val)
+ res.insert(0,level_val)
+ return res
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/levelsearch2/bfs2.py" "b/\345\205\211\345\237\216/levelsearch2/bfs2.py"
new file mode 100644
index 0000000..c0beaf1
--- /dev/null
+++ "b/\345\205\211\345\237\216/levelsearch2/bfs2.py"
@@ -0,0 +1,20 @@
+class Solution:
+ def levelOrderBottom(self, root):
+ # write your code here
+ res = []
+ if not root:
+ return []
+ res_list = []
+ root_list = [root]
+ while root_list and len(root_list)!=0:
+ val_list = []
+ level_list = []
+ for node in root_list:
+ val_list.append(node.val)
+ if node.left:
+ level_list.append(node.left)
+ if node.right:
+ level_list.append(node.right)
+ root_list = level_list
+ res_list.insert(0,val_list)
+ return res_list
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/levelsearch2/collection.py" "b/\345\205\211\345\237\216/levelsearch2/collection.py"
new file mode 100644
index 0000000..c4afcd7
--- /dev/null
+++ "b/\345\205\211\345\237\216/levelsearch2/collection.py"
@@ -0,0 +1,22 @@
+class Solution:
+ def levelOrderBottom(self, root):
+ # write your code here
+ res = []
+ if not root:
+ return res
+ import collections
+ queue = collections.deque()
+ queue.append(root)
+ # visited = set(root)
+ while queue:
+ length = len(queue)
+ level_val = []
+ for _ in range(length):
+ node = queue.popleft()
+ level_val.append(node.val)
+ if node.left:
+ queue.append(node.left)
+ if node.right:
+ queue.append(node.right)
+ res.insert(0,level_val)
+ return res
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/levelsearch2/dfs.py" "b/\345\205\211\345\237\216/levelsearch2/dfs.py"
new file mode 100644
index 0000000..b5d3bbd
--- /dev/null
+++ "b/\345\205\211\345\237\216/levelsearch2/dfs.py"
@@ -0,0 +1,19 @@
+class Solution:
+ def levelOrderBottom(self, root):
+ if not root:
+ return []
+ self.result = []
+ self.dfs(root, 0)
+ return self.result
+ def dfs(self, root, level):
+ if len(self.result) < level + 1:
+ self.result.append([])
+ self.result[level].append(root.val)
+ if root.left:
+ self.dfs(root.left, level + 1)
+ if root.right:
+ self.dfs(root.right, level + 1)
+
+t = [[3],[9,20],[15,7]]
+t =[2,1]
+print(t[::-1])
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/search/binary_search.py" "b/\345\205\211\345\237\216/search/binary_search.py"
new file mode 100644
index 0000000..24fc257
--- /dev/null
+++ "b/\345\205\211\345\237\216/search/binary_search.py"
@@ -0,0 +1,17 @@
+class BS:
+ def search(self,nums,target):
+ return self.bsearch(nums,0,len(nums)-1,target)
+ def bsearch(self,nums,low,high,target):
+ while(low<=high):
+ mid = (low+high)//2
+ if nums[mid] == target:
+ return mid
+ elif nums[mid] < target:
+ low=mid+1
+ elif nums[mid] > target:
+ high=mid-1
+ return None
+nums = [9,5,7,0,1,2,3,12]
+target = 0
+bs = BS()
+print(bs.search(nums,target))
\ No newline at end of file
diff --git "a/\345\205\211\345\237\216/search/search_bn.py" "b/\345\205\211\345\237\216/search/search_bn.py"
new file mode 100644
index 0000000..d3d4719
--- /dev/null
+++ "b/\345\205\211\345\237\216/search/search_bn.py"
@@ -0,0 +1,27 @@
+class Solution:
+ def search(self, nums, target):
+ """
+ :type nums: List[int]
+ :type target: int
+ :rtype: int
+ """
+ import sys
+ sys.setrecursionlimit(100000) # 这里设置为十万
+ return self.zheban(nums, target, 0, len(nums) - 1)
+
+ def zheban(self, nums, target, low, high):
+ if high < low:
+ return -1
+ mid = (low + high) // 2
+ if nums[mid] == target:
+ return mid
+ if nums[mid] >= nums[low]:
+ if nums[mid] >= target and target >= nums[low]:
+ return self.zheban(nums, target, low, mid - 1)
+ else:
+ return self.zheban(nums, target, mid + 1, high)
+ else:
+ if nums[mid] <= target and target <= nums[high]:
+ return self.zheban(nums, target, mid + 1, high)
+ else:
+ return self.zheban(nums, target, low, mid - 1)
\ No newline at end of file
diff --git "a/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/leetcode638.py" "b/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/leetcode638.py"
new file mode 100644
index 0000000..93bd25d
--- /dev/null
+++ "b/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/leetcode638.py"
@@ -0,0 +1,26 @@
+
+
+class Solution(object):
+ def shoppingOffers(self, price, special, needs):
+ """
+ :type price: List[int]
+ :type special: List[List[int]]
+ :type needs: List[int]
+ :rtype: int
+ 这题可以思考为常数为单买,变数为礼包,只有礼包才能更新最小值,因此题目变成了求有限情况下礼包组合的最小值,暴力即可。
+ """
+ def check(a,b):
+ for i in range(len(a)):
+ if a[i]