git地址
https://github.com/yangyu2010/leetcode
其他
https://github.com/yangyu2010/leetcode/blob/master/leetcode/1兩數(shù)之和.py
- 整數(shù)反轉(zhuǎn)
https://leetcode-cn.com/problems/reverse-integer/
https://github.com/yangyu2010/leetcode/blob/master/leetcode/7整數(shù)反轉(zhuǎn).py
https://github.com/yangyu2010/leetcode/blob/master/leetcode/66加一.py
https://github.com/yangyu2010/leetcode/blob/master/leetcode/704二分查找.py
棧
https://github.com/yangyu2010/leetcode/blob/master/棧/20有效的括號.py
https://github.com/yangyu2010/leetcode/blob/master/棧/150逆波蘭表達式求值.py
https://github.com/yangyu2010/leetcode/blob/master/棧/155最小棧.py
隊列
https://github.com/yangyu2010/leetcode/blob/master/隊列/622循環(huán)隊列.py
數(shù)組
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/27移除元素.py
- 在排序數(shù)組中查找元素的第一個和最后一個位置
https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/34在排序數(shù)組中查找元素的第一個和最后一個位置.py
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/54螺旋矩陣.py
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/118楊輝三角.py
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/119楊輝三角%20II.py
- 兩數(shù)之和 II - 輸入有序數(shù)組
https://leetcode-cn.com/problems/two-sum-ii-input-array-is-sorted/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/167兩數(shù)之和II-輸入有序數(shù)組.py
- 旋轉(zhuǎn)數(shù)組
https://leetcode-cn.com/problems/rotate-array/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/189旋轉(zhuǎn)數(shù)組.py
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/209長度最小的子數(shù)組.py
- 最大連續(xù)1的個數(shù)
https://leetcode-cn.com/problems/max-consecutive-ones/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/485最大連續(xù)1的個數(shù).py
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/498對角線遍歷.py
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/561數(shù)組拆分I.py
- 尋找數(shù)組的中心索引
https://leetcode-cn.com/problems/find-pivot-index/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/724尋找數(shù)組的中心索引.py
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/739每日溫度.py
- 至少是其他數(shù)字兩倍的最大數(shù)
https://leetcode-cn.com/problems/largest-number-at-least-twice-of-others/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/747至少是其他數(shù)字兩倍的最大數(shù).py
字符串
https://github.com/yangyu2010/leetcode/blob/master/字符串/3無重復字符的最長子串.py
- 字符串轉(zhuǎn)換整數(shù) (atoi)
https://leetcode-cn.com/problems/string-to-integer-atoi/
https://github.com/yangyu2010/leetcode/blob/master/字符串/8字符串轉(zhuǎn)換整數(shù).py
https://github.com/yangyu2010/leetcode/blob/master/字符串/14最長公共前綴.py
- 實現(xiàn) strStr()
https://leetcode-cn.com/problems/implement-strstr/
https://github.com/yangyu2010/leetcode/blob/master/字符串/28實現(xiàn)strStr.py
- 二進制求和
https://leetcode-cn.com/problems/a]
[pohjlo;p[']
d-binary/
https://github.com/yangyu2010/leetcode/blob/master/字符串/67二進制求和.py
- 翻轉(zhuǎn)字符串里的單詞
https://leetcode-cn.com/problems/reverse-words-in-a-string/
https://github.com/yangyu2010/leetcode/blob/master/字符串/151翻轉(zhuǎn)字符串里的單詞.py
- 反轉(zhuǎn)字符串
https://leetcode-cn.com/problems/reverse-string/
https://github.com/yangyu2010/leetcode/blob/master/字符串/344反轉(zhuǎn)字符串.py
鏈表
https://github.com/yangyu2010/leetcode/blob/master/鏈表/2兩數(shù)相加.py
- 刪除鏈表的倒數(shù)第N個節(jié)點
https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/19刪除鏈表的倒數(shù)第N個節(jié)點.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/21合并兩個有序鏈表.py
- 旋轉(zhuǎn)鏈表
https://leetcode-cn.com/problems/rotate-list/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/61旋轉(zhuǎn)鏈表.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/141環(huán)形鏈表.py
- 環(huán)形鏈表 II
https://leetcode-cn.com/problems/linked-list-cycle-ii/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/142環(huán)形鏈表%20II.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/160相交鏈表.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/203移除鏈表元素.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/206反轉(zhuǎn)鏈表.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/234回文鏈表.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/237刪除鏈表中的節(jié)點.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/328奇偶鏈表.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/707設計鏈表.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/707設計鏈表雙鏈表.py
二叉樹
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/101對稱二叉樹.py
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/102二叉樹的層次遍歷.py
- 從前序與中序遍歷序列構造二叉樹
https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/105從前序與中序遍歷序列構造二叉樹.py
- 從中序與后序遍歷序列構造二叉樹
https://leetcode-cn.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/106從中序與后序遍歷序列構造二叉樹.py
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/112路徑總和.py
- 填充每個節(jié)點的下一個右側(cè)節(jié)點指針
https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/116填充每個節(jié)點的下一個右側(cè)節(jié)點指針.py
- 二叉搜索樹的最近公共祖先
https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-search-tree/submissions/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/235二叉搜索樹的最近公共祖先.py
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/236二叉樹的最近公共祖先.py
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/297二叉樹的序列化與反序列化.py