diff --git a/.idea/learning-algorithm.iml b/.idea/learning-algorithm.iml
new file mode 100644
index 0000000..e9de3de
--- /dev/null
+++ b/.idea/learning-algorithm.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..2012045
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..3627932
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..24eabd1
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1543997006208
+
+
+ 1543997006208
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex1.png b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex1.png
new file mode 100644
index 0000000..924a61d
Binary files /dev/null and b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex1.png differ
diff --git a/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex2.png b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex2.png
new file mode 100644
index 0000000..bdf640c
Binary files /dev/null and b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex2.png differ
diff --git a/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex3.jpeg b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex3.jpeg
new file mode 100644
index 0000000..98b10b2
Binary files /dev/null and b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/img_ex3.jpeg differ
diff --git a/QianHu/Tsinghua_DS_MOOC/ProperRebuild/main.c b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/main.c
new file mode 100644
index 0000000..256c72e
--- /dev/null
+++ b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/main.c
@@ -0,0 +1,88 @@
+//
+// Created by Qian Hu on 2018/12/5.
+//
+
+#include
+#include
+
+
+typedef struct TreeNode {
+ struct TreeNode* left;
+ struct TreeNode* right;
+ int value;
+} TreeNode, *Tree;
+
+typedef struct Stack {
+ TreeNode *data;
+ int top;
+} Stack;
+
+
+Tree buildTree(int pre[], int post[], int len) {
+ Tree tree;
+ if (!len) {
+ return NULL;
+ }
+ tree = (Tree)malloc(sizeof(TreeNode));
+ tree->value = pre[0];
+ if (len == 1) {
+ tree->left = NULL;
+ tree->right = NULL;
+ return tree;
+ }
+ int i;
+ for (i = 0; i < len && post[i] != pre[1]; i++);
+ tree->left = buildTree(pre + 1, post, i + 1);
+ tree->right = buildTree(pre + i + 2, post + i + 1, len - i - 2);
+ return tree;
+}
+
+
+void in_order_traverse_tree_recursion(Tree tree) {
+ if (tree) {
+ in_order_traverse_tree_recursion(tree->left);
+ printf("%d ", tree->value);
+ in_order_traverse_tree_recursion(tree->right);
+ }
+}
+
+
+void in_order_traverse_tree_iteration(Tree tree, int num) {
+ Stack *stack = (Stack *)malloc(sizeof(stack));
+ stack->data = (TreeNode *)malloc(sizeof(TreeNode) * num);
+ int top = 0;
+
+ TreeNode* p = tree;
+ while (1) {
+ while (p) {
+ stack->data[top++] = *p;
+ p = p->left;
+ }
+ if (top == 0) {
+ break;
+ }
+ p = &stack->data[--top];
+ printf("%d ", p->value);
+ p = p->right;
+ }
+}
+
+
+int main() {
+ int num;
+ Tree tree;
+ scanf("%d", &num);
+ int *pre_order, *post_order;
+ pre_order = (int*)malloc(sizeof(int) * num);
+ post_order = (int*)malloc(sizeof(int) * num);
+ for (int i = 0; i < num; i++) {
+ scanf("%d", &pre_order[i]);
+ }
+ for (int i = 0; i < num; i++) {
+ scanf("%d", &post_order[i]);
+ }
+ tree = buildTree(pre_order, post_order, num);
+// in_order_traverse_tree_recursion(tree);
+ in_order_traverse_tree_iteration(tree, num);
+ return 0;
+}
\ No newline at end of file
diff --git a/QianHu/Tsinghua_DS_MOOC/ProperRebuild/readme.md b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/readme.md
new file mode 100644
index 0000000..4fe6580
--- /dev/null
+++ b/QianHu/Tsinghua_DS_MOOC/ProperRebuild/readme.md
@@ -0,0 +1,242 @@
+# 真二叉树重构(Proper Rebuild)
+
+## Description
+In general, given the preorder traversal sequence and postorder traversal sequence of a binary tree, we cannot determine the binary tree.
+
+
+
+
+Figure 1
+
+In Figure 1 for example, although they are two different binary tree, their preorder traversal sequence and postorder traversal sequence are both of the same.
+
+But for one proper binary tree, in which each internal node has two sons, we can uniquely determine it through its given preorder traversal sequence and postorder traversal sequence.
+
+Label n nodes in one binary tree using the integers in [1, n], we would like to output the inorder traversal sequence of a binary tree through its preorder and postorder traversal sequence.
+
+## Input
+The 1st line is an integer n, i.e., the number of nodes in one given binary tree,
+
+The 2nd and 3rd lines are the given preorder and postorder traversal sequence respectively.
+
+## Output
+The inorder traversal sequence of the given binary tree in one line.
+
+## Example
+### Input
+```
+5
+1 2 4 5 3
+4 5 2 3 1
+```
+
+### Output
+```
+4 2 5 1 3
+```
+
+## Restrictions
+For 95% of the estimation, 1 <= n <= 1,000,00
+
+For 100% of the estimation, 1 <= n <= 4,000,000
+
+The input sequence is a permutation of {1,2...n}, corresponding to a legal binary tree.
+
+Time: 2 sec
+
+Memory: 256 MB
+
+## Hints
+
+
+Figure 2
+
+In Figure 2, observe the positions of the left and right children in preorder and postorder traversal sequence.
+
+
+
+## 题目来源与背景
+
+此题是【学堂在线】上2016年暑期清华大学邓俊辉老师【数据结构】MOOC课程的一道PA(现在应该还会有),之前做过一次了,但时间过去已久,对思路有所遗忘,加之最近要准备数据结构考试,这是一道很经典的二叉树构造题目,决定拿出来具体分析下
+
+
+
+## 问题描述
+
+给定一个二叉树的先序遍历以及后序遍历,求其中序遍历
+
+
+
+## 题目分析
+
+此题目需要先根据先序遍历和后序遍历的特点求出一个二叉树,然后中序遍历这个二叉树并打印每个节点的元素值
+
+### 1. 二叉树的构造
+
+#### 1.1 分析先序遍历和后序遍历的特点
+
+ 
+
+- 先序遍历的第0个元素为根节点P,后序遍历的最后一个元素也是根节点P
+- 先序遍历的第1个元素为其左孩子节点L
+- 后序遍历中,若其右孩子R存在,则必在后序遍历的倒数第二个节点
+- 后序遍历中,左孩子L左边的所有元素都是属于其左孩子所在的树
+- 后序遍历中,左孩子L右边第一个元素到右孩子R都是右孩子R所在的树
+- 先序遍历中,属于左(右)孩子的树的顺序必然也是其左(右)孩子所在树的先序遍历
+- 后序遍历中,属于左(右)孩子的树的顺序必然也是其左(右)孩子所在树的后序遍历
+
+#### 1.2 左右子树的分割
+
+根据以上特点,我们可以将先序遍历和后序遍历划分出左右子树分别的元素,那么寻找左孩子L在后序遍历中的位置j(我们记i为j-1,索引均从0开始)就很重要了,找到这个位置i后,我们就可以将构造二叉树的问题分而治之为两个分别构造其左子树和右子树的问题了
+
+- 左子树的长度为i+1,其中,其先序遍历为原先序遍历从第1个到第i个(R前一个),后序遍历为原后序遍历第0个到第i个(L)
+- 右子树的长度相应为len - i - 2(去掉根节点P),其先序遍历为原先序遍历从R开始的所有,也就是从索引i+2开始,其后序遍历从原后序遍历L右侧到R,也就是从i+1开始
+
+#### 1.3 边界情况考虑,即递归基
+
+- 如果树的节点个数为0,其必然为空
+- 如果树的节点个树为1,那么就是个没有左右子树的根节点
+
+### 2. 中序遍历
+
+#### 2.1 递归方法
+
+根据中序遍历的定义,遍历一课树tree可表述为
+
+- 中序遍历tree的左子树
+- 打印tree的根节点
+- 中序遍历tree的右子树
+
+#### 2.2 迭代算法
+
+
+
+图取自邓俊辉老师【数据结构(C++版)第3版】
+
+中序遍历的过程就是要顺着最左侧的通路,至底而上依次访问各节点及其右子树,这满足先进后出的要求,因此可以用栈来实现
+
+- 先沿着根节点依次访问其左子树,并将其节点依次push栈中,直至访问到最左侧的节点
+- pop出栈中的元素,访问该节点,并转向右子树
+- 循环过程,直至栈中再无元素
+
+
+
+## 代码实现
+
+```c
+//
+// Created by Qian Hu on 2018/12/5.
+//
+
+#include
+#include
+
+
+typedef struct TreeNode {
+ struct TreeNode* left;
+ struct TreeNode* right;
+ int value;
+} TreeNode, *Tree;
+
+typedef struct Stack {
+ TreeNode *data;
+ int top;
+} Stack;
+
+
+Tree buildTree(int pre[], int post[], int len) {
+ Tree tree;
+ if (!len) {
+ return NULL;
+ }
+ tree = (Tree)malloc(sizeof(TreeNode));
+ tree->value = pre[0];
+ if (len == 1) {
+ tree->left = NULL;
+ tree->right = NULL;
+ return tree;
+ }
+ int i;
+ for (i = 0; i < len && post[i] != pre[1]; i++);
+ tree->left = buildTree(pre + 1, post, i + 1);
+ tree->right = buildTree(pre + i + 2, post + i + 1, len - i - 2);
+ return tree;
+}
+
+
+void in_order_traverse_tree_recursion(Tree tree) {
+ if (tree) {
+ in_order_traverse_tree_recursion(tree->left);
+ printf("%d ", tree->value);
+ in_order_traverse_tree_recursion(tree->right);
+ }
+}
+
+
+void in_order_traverse_tree_iteration(Tree tree, int num) {
+ Stack *stack = (Stack *)malloc(sizeof(stack));
+ stack->data = (TreeNode *)malloc(sizeof(TreeNode) * num);
+ int top = 0;
+
+ TreeNode* p = tree;
+ while (1) {
+ while (p) {
+ stack->data[top++] = *p;
+ p = p->left;
+ }
+ if (top == 0) {
+ break;
+ }
+ p = &stack->data[--top];
+ printf("%d ", p->value);
+ p = p->right;
+ }
+}
+
+
+int main() {
+ int num;
+ Tree tree;
+ scanf("%d", &num);
+ int *pre_order, *post_order;
+ pre_order = (int*)malloc(sizeof(int) * num);
+ post_order = (int*)malloc(sizeof(int) * num);
+ for (int i = 0; i < num; i++) {
+ scanf("%d", &pre_order[i]);
+ }
+ for (int i = 0; i < num; i++) {
+ scanf("%d", &post_order[i]);
+ }
+ tree = buildTree(pre_order, post_order, num);
+// in_order_traverse_tree_recursion(tree);
+ in_order_traverse_tree_iteration(tree, num);
+ return 0;
+}
+```
+
+
+
+## 运行结果
+
+| Case No. | Result | Time(ms) | Memory(KB) |
+| -------- | -------- | -------- | ---------- |
+| 1 | Accepted | 0 | 7296 |
+| 2 | Accepted | 0 | 7296 |
+| 3 | Accepted | 0 | 7296 |
+| 4 | Accepted | 0 | 7296 |
+| 5 | Accepted | 0 | 7296 |
+| 6 | Accepted | 0 | 7296 |
+| 7 | Accepted | 0 | 7296 |
+| 8 | Accepted | 0 | 7296 |
+| 9 | Accepted | 0 | 7296 |
+| 10 | Accepted | 0 | 7296 |
+| 11 | Accepted | 0 | 7296 |
+| 12 | Accepted | 64 | 15572 |
+| 13 | Accepted | 112 | 21352 |
+| 14 | Accepted | 236 | 36364 |
+| 15 | Accepted | 248 | 37932 |
+| 16 | Accepted | 420 | 62752 |
+| 17 | Accepted | 372 | 61780 |
+| 18 | Accepted | 304 | 47800 |
+| 19 | Accepted | 456 | 64404 |
+| 20 | Accepted | 1416 | 207156 |
\ No newline at end of file
diff --git a/QianHu/readme.md b/QianHu/readme.md
new file mode 100644
index 0000000..f596e64
--- /dev/null
+++ b/QianHu/readme.md
@@ -0,0 +1,4 @@
+# QianHu贡献内容
+
+1.真二叉树重构
+
diff --git a/kaakxixi/readme.md b/kaakxixi/readme.md
new file mode 100644
index 0000000..1e8e3c0
--- /dev/null
+++ b/kaakxixi/readme.md
@@ -0,0 +1,2 @@
+## kaakxixi贡献内容
+* 两数之和
\ No newline at end of file
diff --git "a/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/contains_duplicate_2.py" "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/contains_duplicate_2.py"
new file mode 100644
index 0000000..bb3ca37
--- /dev/null
+++ "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/contains_duplicate_2.py"
@@ -0,0 +1,13 @@
+"""
+Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k.
+"""
+"""仍然用dict保存数组元素出现的位置,两种情况下更新"""
+
+class Solution(object):
+ def containsDuplicate2(self,nums,k):
+ dic = dict()
+ for index,value in enumerate(nums):
+ if value in dic and index - dic[value] <= k:
+ return True
+ dic[value] = index
+ return False
\ No newline at end of file
diff --git "a/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/intersection_of_two_arrays.py" "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/intersection_of_two_arrays.py"
new file mode 100644
index 0000000..0040cfa
--- /dev/null
+++ "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/intersection_of_two_arrays.py"
@@ -0,0 +1,22 @@
+"""
+Given two arrays, write a function to compute their intersection.
+Example:
+Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].
+"""
+
+"""可以使用hash table保存下数组1的出现的元素,然后判断数组2中的各元素是否在数组1中出现过,但直接使用set更简单"""
+class Solution(object):
+ def intersectionOfTwoArrays(self,nums1,nums2):
+ """
+ :type nums1: List[int]
+ :type nums2: List[int]
+ :rtype: List[int]
+ """
+ result = []
+ for value in set(nums1):
+ if value in set(nums2):
+ result.append(value)
+ return result
+
+ '''利用列表表达式'''
+ return [i for i in set(nums1) if i in set(nums2)]
diff --git "a/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/intersection_of_two_arrays_2.py" "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/intersection_of_two_arrays_2.py"
new file mode 100644
index 0000000..e767d01
--- /dev/null
+++ "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/intersection_of_two_arrays_2.py"
@@ -0,0 +1,13 @@
+"""
+Given two arrays, write a function to compute their intersection.
+Example:
+Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].
+Note:
+Each element in the result should appear as many times as it shows in both arrays.
+The result can be in any order.
+Follow up:
+What if the given array is already sorted? How would you optimize your algorithm?
+What if nums1's size is small compared to nums2's size? Which algorithm is better?
+What if elements of nums2 are stored on disk, and the memory is limited such that you cannot load all elements into the memory at once?
+"""
+"""使用两个字典记录下两个数组中元素出现的次数"""
diff --git "a/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/readme.md" "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/readme.md"
new file mode 100644
index 0000000..1331f50
--- /dev/null
+++ "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/readme.md"
@@ -0,0 +1,11 @@
+LeetCode 1 两数之和
+2018-12-05
+代码提交地址 https://leetcode-cn.com/problems/two-sum/submissions/
+
+算法分析:
+
+方法1. 整体时间复杂度为O(n^2). 由于python中的list对象实际上是链表,其查询效率为 O(n), 即这里的if 语句if num in nums复杂度为O(n),
+再结合列表循环次数n, 整体时间复杂度为O(n^2).
+
+方法2. 整体时间复杂度为常数级别O(1). 使用散列hash表(python中的dict和set), 将差值target - nums[i]作为dict的键, 索引 i 作为dict的值, 判断列表中的值是否在dict中, 这里对hash表中的元素的访问是常数时间级别.
+
diff --git "a/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/sum_two_nums.py" "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/sum_two_nums.py"
new file mode 100644
index 0000000..535d80a
--- /dev/null
+++ "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/sum_two_nums.py"
@@ -0,0 +1,44 @@
+"""
+给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。
+
+你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。
+
+示例:
+
+给定 nums = [2, 7, 11, 15], target = 9
+
+因为 nums[0] + nums[1] = 2 + 7 = 9
+所以返回 [0, 1]
+"""
+"""方法1是使用list查询差值"""
+class Solution(object):
+ def twoSum(self, nums, target):
+ """
+ :type nums: List[int]
+ :type target: int
+ :rtype: List[int]
+ """
+ for i in range(len(nums)):
+ num = target - nums[i]
+ if num in nums and nums.index(num) != i:
+ return [i,nums.index(num)]
+
+
+"""方法2是使用dict查询差值"""
+ def twoSum2(self, nums, target):
+ """
+ :type nums: List[int]
+ :type target: int
+ :rtype: List[int]
+ """
+ #创建一个空字典
+ dic = {}
+ for i in range(len(nums)):
+ num = target - nums[i]
+ #字典d中存在nums[i]时
+ if nums[i] in dic:
+ return dic[nums[i]],i
+ #否则往字典增加键/值对
+ else:
+ dic[num] = i
+ #边往字典增加键/值对,边与nums[i]进行对比
\ No newline at end of file
diff --git "a/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/valid_anagram.py" "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/valid_anagram.py"
new file mode 100644
index 0000000..a83cb63
--- /dev/null
+++ "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/valid_anagram.py"
@@ -0,0 +1,18 @@
+"""
+Given two strings s and t, write a function to determine if t is an anagram of s.
+For example,
+s = "anagram", t = "nagaram", return true.
+s = "rat", t = "car", return false.
+Note:
+You may assume the string contains only lowercase alphabets.
+"""
+"""用两个字典保存字符出现的情况,判断两个字典是否相同即可"""
+class Solution(object):
+ def validAnagram(self,s,t):
+ dic1 = {}
+ dic2 = {}
+ for i in s:
+ dic1[i] = dic1.get(i,0) + 1
+ for j in t:
+ dic2[j] = dic2.get(j,0) + 1
+ return dic1 == dic2
\ No newline at end of file
diff --git "a/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/word_pattern.py" "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/word_pattern.py"
new file mode 100644
index 0000000..501bef7
--- /dev/null
+++ "b/kaakxixi/\344\270\244\346\225\260\344\271\213\345\222\214/word_pattern.py"
@@ -0,0 +1,24 @@
+"""
+Total Accepted: 76577
+Total Submissions: 233596
+Difficulty: Easy
+Contributor: LeetCode
+Given a pattern and a string str, find if str follows the same pattern.
+Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.
+Examples:
+pattern = "abba", str = "dog cat cat dog" should return true.
+pattern = "abba", str = "dog cat cat fish" should return false.
+pattern = "aaaa", str = "dog cat cat dog" should return false.
+pattern = "abba", str = "dog dog dog dog" should return false.
+Notes:
+You may assume pattern contains only lowercase letters, and str contains lowercase letters separated by a single space.
+"""
+class Solution(object):
+ def wordPattern(self,pattern,str):
+ """
+ :type pattern: str
+ :type str: str
+ :rtype: bool
+ """
+ return len(pattern) == len(str.split(' ')) and len(set(pattern)) == len(
+ set(str.split(' '))) == len(set(zip(pattern,str.split(' '))))
\ No newline at end of file
diff --git a/miss-ann/readme.md b/miss-ann/readme.md
new file mode 100644
index 0000000..f46787f
--- /dev/null
+++ b/miss-ann/readme.md
@@ -0,0 +1,4 @@
+# miss-ann贡献内容
+
+1. 两数之和
+
diff --git a/miss-ann/two_sum/al1/al1.c b/miss-ann/two_sum/al1/al1.c
new file mode 100644
index 0000000..c5a8cbd
--- /dev/null
+++ b/miss-ann/two_sum/al1/al1.c
@@ -0,0 +1,17 @@
+/**
+ * Note: The returned array must be malloced, assume caller calls free().
+ */
+int* twoSum(int* nums, int numsSize, int target) {
+ static int a[2]={0,0};
+ for (int i=0;i map = new HashMap<>();
+ for (int i = 0; i < nums.length; i++) {
+ map.put(nums[i], i);//将每个元素的值和他的索引添加到表中
+ }
+ for (int i = 0; i < nums.length; i++) {
+ int tmp = target - nums[i];
+ if (map.containsKey(tmp) && map.get(tmp) != i) {
+ return new int[] { i, map.get(tmp) };
+ }
+ }
+ throw new IllegalArgumentException("No two sum solution");//异常抛出
+ }
+}
diff --git a/miss-ann/two_sum/al3/al3.java b/miss-ann/two_sum/al3/al3.java
new file mode 100644
index 0000000..bf369ea
--- /dev/null
+++ b/miss-ann/two_sum/al3/al3.java
@@ -0,0 +1,13 @@
+class Solution {
+ public int[] twoSum(int[] nums, int target) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < nums.length; i++) {
+ int tmp = target - nums[i];
+ if (map.containsKey(tmp)) {
+ return new int[] { map.get(tmp), i };
+ }
+ map.put(nums[i], i);
+ }
+ throw new IllegalArgumentException("No two sum solution");
+ }
+}
diff --git a/miss-ann/two_sum/al3/al3.py b/miss-ann/two_sum/al3/al3.py
new file mode 100644
index 0000000..62f0174
--- /dev/null
+++ b/miss-ann/two_sum/al3/al3.py
@@ -0,0 +1,18 @@
+class Solution:
+ def twoSum(self, nums, target):
+ """
+ :type nums: List[int]
+ :type target: int
+ :rtype: List[int]
+ """
+ if not nums:
+ return None
+ d ={}
+ for i,item in enumerate(nums):
+ tmp = target - item
+ for key,value in d.items():
+ if value == tmp:
+ return [i,key]
+
+ d[i] = item
+ return None
diff --git a/miss-ann/two_sum/readme.md b/miss-ann/two_sum/readme.md
new file mode 100644
index 0000000..364b2b7
--- /dev/null
+++ b/miss-ann/two_sum/readme.md
@@ -0,0 +1,161 @@
+Leetcode 小安晋升分享(第一题哦)
+
+# 两数之和
+
+今天是小安开始Leetcode刷题的第一天,一定要加油o.废话不多,进入正文啦…@-@
+
+## 题目描述
+给定一个整数数组 *nums* 和一个目标值*target*,请你在该数组中找出和为目标值的两个**整数**。你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。[题目原址](https://leetcode-cn.com/problems/two-sum/solution/)
+**示例**
+
+> 给定 nums = [2, 7, 11, 15],target = 9
+> 因为 nums[0] +nums[1] =2+7 =9
+> 所以返回 [0,1]
+
+## 方法一:暴力解法
+
+### 思想
+暴力法很简单。遍历每个元素 xx,并查找是否存在一个值与 target - xtarget−x 相等的目标元素。
+
+### 代码实现
+【C实现】
+
+```
+/**
+ * Note: The returned array must be malloced, assume caller calls free().
+ */
+int* twoSum(int* nums, int numsSize, int target) {
+ static int a[2]={0,0};
+ for (int i=0;i map = new HashMap<>();
+ for (int i = 0; i < nums.length; i++) {
+ map.put(nums[i], i);//将每个元素的值和他的索引添加到表中
+ }
+ for (int i = 0; i < nums.length; i++) {
+ int tmp = target - nums[i];
+ if (map.containsKey(tmp) && map.get(tmp) != i) {
+ return new int[] { i, map.get(tmp) };
+ }
+ }
+ throw new IllegalArgumentException("No two sum solution");//异常抛出
+ }
+}
+```
+
+
+### 复杂度分析
+
+ - 时间复杂度:$O(n)$, 我们把包含有 $n$个元素的列表遍历两次。由于哈希表将查找时间缩短到 $O(1)$,所以时间复杂度为 $O(n)$。
+ - 空间复杂度:$O(n)$, 所需的额外空间取决于哈希表中存储的元素数量,该表中存储了$n$ 个元素。
+## 方法三:一遍哈希表
+### 思想
+事实证明,我们可以一次完成。在进行迭代并将元素插入到表中的同时,我们还会回过头来检查表中是否已经存在当前元素所对应的目标元素。如果它存在,那我们已经找到了对应解,并立即将其返回。
+### 代码实现
+【Java实现】
+
+```
+class Solution {
+ public int[] twoSum(int[] nums, int target) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < nums.length; i++) {
+ int tmp = target - nums[i];
+ if (map.containsKey(tmp)) {
+ return new int[] { map.get(tmp), i };
+ }
+ map.put(nums[i], i);
+ }
+ throw new IllegalArgumentException("No two sum solution");
+ }
+}
+```
+【python实现】
+
+```
+class Solution:
+ def twoSum(self, nums, target):
+ """
+ :type nums: List[int]
+ :type target: int
+ :rtype: List[int]
+ """
+ if not nums:
+ return None
+ d ={}
+ for i,item in enumerate(nums):
+ tmp = target - item
+ for key,value in d.items():
+ if value == tmp:
+ return [i,key]
+
+ d[i] = item
+ return None
+
+```
+### 复杂度分析
+
+ - 时间复杂度:$O(n)$, 我们只遍历了包含有$n$个元素的列表一次。在表中进行的每次查找只花费 $O(1)$的时间。
+ - 空间复杂度:$O(n)$, 所需的额外空间取决于哈希表中存储的元素数量,该表最多需要存$n$个元素。
+
+
+# Thanks
+一起加油哦~~
diff --git a/readme.md b/readme.md
index 04e3dad..cb39dbb 100644
--- a/readme.md
+++ b/readme.md
@@ -4,25 +4,39 @@
# 贡献内容
-| 人员 | 贡献内容 |
-| ---------- | ------------------------------------------------------------ |
-| 光城 | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/%E5%85%89%E5%9F%8E) |
-| SugarChl | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/SugarChl) |
-| Archer | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/Archer) |
-| ParkFeng | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/ParkFeng) |
-| codingling | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/codingling) |
-| muchenchen | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/muchenchen) |
-| leon | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/leon) |
-| HughGuo | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/HughGuo) |
-| JeneYang | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/JeneYang) |
-| wangggong | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/wangggong) |
-| Aquila | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/Aquila) |
-| Spareribs | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/Spareribs) |
-| LeafScar | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/LeafScar) |
-| Laqw | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/Laqw) |
-| 卖萌粉松鼠 | [直通点](https://github.com/Light-City/learning-algorithm/tree/master/卖萌粉松鼠) |
-| | |
-| | |
-| | |
-| | |
+| 人员 | 贡献内容 |
+| -------------- | ------------------------------------------------------------ |
+| 光城 | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/%E5%85%89%E5%9F%8E) |
+| SugarChl | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/SugarChl) |
+| Archer | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/Archer) |
+| ParkFeng | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/ParkFeng) |
+| codingling | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/codingling) |
+| muchenchen | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/muchenchen) |
+| leon | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/leon) |
+| HughGuo | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/HughGuo) |
+| JeneYang | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/JeneYang) |
+| wangggong | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/wangggong) |
+| Aquila | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/Aquila) |
+| Spareribs | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/Spareribs) |
+| LeafScar | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/LeafScar) |
+| Laqw | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/Laqw) |
+| 卖萌粉松鼠 | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/卖萌粉松鼠) |
+| yuhuacao | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/yuhuacao) |
+| kaakxixi | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/kaakxixi) |
+| QianHu | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/QianHu) |
+| 底层搬砖工 | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/%E5%BA%95%E5%B1%82%E6%90%AC%E7%A0%96%E5%B7%A5) |
+| miss-ann | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/miss-ann) |
+| woyaoyangguang | [直通点](https://github.com/guangcity/learning-algorithm/tree/master/woyaoyangguang) |
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
diff --git a/woyaoyangguang/delete_duplicate/deltete_duplicate.py b/woyaoyangguang/delete_duplicate/deltete_duplicate.py
new file mode 100644
index 0000000..bcb6d4b
--- /dev/null
+++ b/woyaoyangguang/delete_duplicate/deltete_duplicate.py
@@ -0,0 +1,30 @@
+'''
+给定一个排序数组,你需要在原地删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度.
+
+示例:
+给定数组 nums=[1,1,2]
+函数应该返回新长度2,并且原数组nums的前两个元素被修改为1,2.
+你不需要考虑数组中超出新长度后面的元素.
+'''
+
+'''
+思路:
+如果列表中数字为1个,则直接返回该列表长度;
+如果列表长度大于1,则需要判断.列表的索引位置为s,当前索引位置的下一位索引为f,
+如果当前位置的索引s和下一位置的索引f对应的值不同,则将j位置对应的值更新到s位置,
+重新输出的新长度为s+1.
+'''
+class Solution:
+ def removeDuplicates(self, nums):
+ """
+ :type nums: List[int]
+ :rtype: int
+ """
+ if len(nums)<=1:
+ return len(nums)
+ s=0
+ for f in range(1,len(nums)):
+ if nums[s]!=nums[f]:
+ s+=1
+ nums[s]=nums[f]
+ return s+1
\ No newline at end of file
diff --git a/woyaoyangguang/readme.md b/woyaoyangguang/readme.md
new file mode 100644
index 0000000..97f5a27
--- /dev/null
+++ b/woyaoyangguang/readme.md
@@ -0,0 +1,5 @@
+# 我要阳光 贡献内容
+
+
+
+1.从排序数组中删除重复项 delete_duplicates
\ No newline at end of file
diff --git a/yuhuacao/mergeSortedArray.py b/yuhuacao/mergeSortedArray.py
new file mode 100644
index 0000000..361416c
--- /dev/null
+++ b/yuhuacao/mergeSortedArray.py
@@ -0,0 +1,30 @@
+"""
+Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
+
+Note:
+You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional elements from nums2. The number of elements initialized in nums1 and nums2 are m and n respectively.
+"""
+"""
+主要思路:设置遍历数组1和数组2的指针i=m-1,j=n-1,设置更新数组1的指针k=m+n-1。遍历数组,如果数组1中的值大于数组2,或者数组2遍历到头了,并且数组1没有到头,则更新数组1,nums1[k] = nums1[i–],否则nums1[k] = nums2[j–]。当k小于0时遍历结束。
+"""
+
+class Solution(object):
+ def merge(self, nums1, m, nums2, n):
+ """
+ :type nums1: List[int]
+ :type m: int
+ :type nums2: List[int]
+ :type n: int
+ :rtype: void Do not return anything, modify nums1 in-place instead.
+ """
+ i=m-1
+ j=n-1
+ k=m+n-1
+ while k>=0:
+ if (j<0 or nums1[i]>nums2[j]) and i>=0:
+ nums1[k]=nums1[i]
+ i-=1
+ else:
+ nums1[k]=nums2[j]
+ j-=1
+ k-=1
diff --git a/yuhuacao/readme.md b/yuhuacao/readme.md
new file mode 100644
index 0000000..766f250
--- /dev/null
+++ b/yuhuacao/readme.md
@@ -0,0 +1,3 @@
+# yuhuacao贡献内容
+
+1. Merge Sorted Array
diff --git "a/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/readme.txt" "b/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/readme.txt"
new file mode 100644
index 0000000..7b9575e
--- /dev/null
+++ "b/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/readme.txt"
@@ -0,0 +1,22 @@
+class Solution(object):
+ def rotate(self, matrix):
+ """
+ :type matrix: List[List[int]]
+ :rtype: void Do not return anything, modify matrix in-place instead.
+ """
+ lens = len(matrix)
+ for x in range(lens):
+ for y in range(lens-x):
+ matrix[x][y],matrix[lens-y-1][lens-x-1] = matrix[lens-y-1][lens-x-1],matrix[x][y]
+ for p in range(lens):
+ for q in range(lens/2):
+ matrix[q][p],matrix[lens-1-q][p] = matrix[lens-1-q][p],matrix[q][p]
+
+
+
+这题考查空间想象,可以想象一个矩阵翻转一个面,然后同时旋转90度,翻转的逆时针90,未翻转的顺时针90
+
+由仿射定理可知这时候将未翻转的翻转过来就是所需的答案。
+
+i,j - 》 (n-1-i,j)->(n-1-j,n-1-i)
+
diff --git "a/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/submit.py" "b/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/submit.py"
new file mode 100644
index 0000000..7ee5e12
--- /dev/null
+++ "b/\345\272\225\345\261\202\346\220\254\347\240\226\345\267\245/submit.py"
@@ -0,0 +1,13 @@
+class Solution(object):
+ def rotate(self, matrix):
+ """
+ :type matrix: List[List[int]]
+ :rtype: void Do not return anything, modify matrix in-place instead.
+ """
+ lens = len(matrix)
+ for x in range(lens):
+ for y in range(lens-x):
+ matrix[x][y],matrix[lens-y-1][lens-x-1] = matrix[lens-y-1][lens-x-1],matrix[x][y]
+ for p in range(lens):
+ for q in range(lens/2):
+ matrix[q][p],matrix[lens-1-q][p] = matrix[lens-1-q][p],matrix[q][p]
\ No newline at end of file