Leetcode

git地址
https://github.com/yangyu2010/leetcode

其他

  1. 兩數(shù)之和
    https://leetcode-cn.com/problems/two-sum/
https://github.com/yangyu2010/leetcode/blob/master/leetcode/1兩數(shù)之和.py
  1. 整數(shù)反轉(zhuǎn)
    https://leetcode-cn.com/problems/reverse-integer/
https://github.com/yangyu2010/leetcode/blob/master/leetcode/7整數(shù)反轉(zhuǎn).py
  1. 加一
    https://leetcode-cn.com/problems/plus-one/
https://github.com/yangyu2010/leetcode/blob/master/leetcode/66加一.py
  1. 二分查找
    https://leetcode-cn.com/problems/binary-search/
https://github.com/yangyu2010/leetcode/blob/master/leetcode/704二分查找.py

  1. 有效的括號
    https://leetcode-cn.com/problems/valid-parentheses/submissions/
https://github.com/yangyu2010/leetcode/blob/master/棧/20有效的括號.py
  1. 逆波蘭表達式求值
    https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/
https://github.com/yangyu2010/leetcode/blob/master/棧/150逆波蘭表達式求值.py
  1. 最小棧
    https://leetcode-cn.com/problems/min-stack/
https://github.com/yangyu2010/leetcode/blob/master/棧/155最小棧.py

隊列

  1. 設計循環(huán)隊列
    https://leetcode-cn.com/problems/design-circular-queue/
https://github.com/yangyu2010/leetcode/blob/master/隊列/622循環(huán)隊列.py

數(shù)組

  1. 移除元素
    https://leetcode-cn.com/problems/remove-element/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/27移除元素.py
  1. 在排序數(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
  1. 螺旋矩陣
    https://leetcode-cn.com/problems/spiral-matrix/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/54螺旋矩陣.py
  1. 楊輝三角
    https://leetcode-cn.com/problems/pascals-triangle/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/118楊輝三角.py
  1. 楊輝三角 II
    https://leetcode-cn.com/problems/pascals-triangle-ii/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/119楊輝三角%20II.py
  1. 兩數(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
  1. 旋轉(zhuǎn)數(shù)組
    https://leetcode-cn.com/problems/rotate-array/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/189旋轉(zhuǎn)數(shù)組.py
  1. 長度最小的子數(shù)組
    https://leetcode-cn.com/problems/minimum-size-subarray-sum/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/209長度最小的子數(shù)組.py
  1. 最大連續(xù)1的個數(shù)
    https://leetcode-cn.com/problems/max-consecutive-ones/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/485最大連續(xù)1的個數(shù).py
  1. 對角線遍歷
    https://leetcode-cn.com/problems/diagonal-traverse/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/498對角線遍歷.py
  1. 數(shù)組拆分 I
    https://leetcode-cn.com/problems/array-partition-i/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/561數(shù)組拆分I.py
  1. 尋找數(shù)組的中心索引
    https://leetcode-cn.com/problems/find-pivot-index/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/724尋找數(shù)組的中心索引.py
  1. 每日溫度
    https://leetcode-cn.com/problems/daily-temperatures/
https://github.com/yangyu2010/leetcode/blob/master/數(shù)組/739每日溫度.py
  1. 至少是其他數(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

字符串

  1. 無重復字符的最長子串
    https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/
https://github.com/yangyu2010/leetcode/blob/master/字符串/3無重復字符的最長子串.py
  1. 字符串轉(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
  1. 最長公共前綴
    https://leetcode-cn.com/problems/longest-common-prefix/submissions/
https://github.com/yangyu2010/leetcode/blob/master/字符串/14最長公共前綴.py
  1. 實現(xiàn) strStr()
    https://leetcode-cn.com/problems/implement-strstr/
https://github.com/yangyu2010/leetcode/blob/master/字符串/28實現(xiàn)strStr.py
  1. 二進制求和
    https://leetcode-cn.com/problems/a]
    [pohjlo;p[']
    d-binary/
https://github.com/yangyu2010/leetcode/blob/master/字符串/67二進制求和.py
  1. 翻轉(zhuǎn)字符串里的單詞
    https://leetcode-cn.com/problems/reverse-words-in-a-string/
https://github.com/yangyu2010/leetcode/blob/master/字符串/151翻轉(zhuǎn)字符串里的單詞.py
  1. 反轉(zhuǎn)字符串
    https://leetcode-cn.com/problems/reverse-string/
https://github.com/yangyu2010/leetcode/blob/master/字符串/344反轉(zhuǎn)字符串.py

鏈表

  1. 兩數(shù)相加
    https://leetcode-cn.com/problems/add-two-numbers/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/2兩數(shù)相加.py
  1. 刪除鏈表的倒數(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
  1. 合并兩個有序鏈表
    https://leetcode-cn.com/problems/merge-two-sorted-lists/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/21合并兩個有序鏈表.py
  1. 旋轉(zhuǎn)鏈表
    https://leetcode-cn.com/problems/rotate-list/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/61旋轉(zhuǎn)鏈表.py
  1. 環(huán)形鏈表
    https://leetcode-cn.com/problems/linked-list-cycle/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/141環(huán)形鏈表.py
  1. 環(huán)形鏈表 II
    https://leetcode-cn.com/problems/linked-list-cycle-ii/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/142環(huán)形鏈表%20II.py
  1. 相交鏈表
    https://leetcode-cn.com/problems/intersection-of-two-linked-lists/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/160相交鏈表.py
  1. 移除鏈表元素
    https://leetcode-cn.com/problems/remove-linked-list-elements/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/203移除鏈表元素.py
  1. 反轉(zhuǎn)鏈表
    https://leetcode-cn.com/problems/reverse-linked-list/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/206反轉(zhuǎn)鏈表.py
  1. 回文鏈表
    https://leetcode-cn.com/problems/palindrome-linked-list/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/234回文鏈表.py
  1. 刪除鏈表中的節(jié)點
    https://leetcode-cn.com/problems/delete-node-in-a-linked-list/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/237刪除鏈表中的節(jié)點.py
  1. 奇偶鏈表
    https://leetcode-cn.com/problems/odd-even-linked-list/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/328奇偶鏈表.py
  1. 設計鏈表
    https://leetcode-cn.com/problems/design-linked-list/
https://github.com/yangyu2010/leetcode/blob/master/鏈表/707設計鏈表.py
https://github.com/yangyu2010/leetcode/blob/master/鏈表/707設計鏈表雙鏈表.py

二叉樹

  1. 對稱二叉樹
    https://leetcode-cn.com/problems/symmetric-tree/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/101對稱二叉樹.py
  1. 二叉樹的層次遍歷
    https://leetcode-cn.com/problems/binary-tree-level-order-traversal/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/102二叉樹的層次遍歷.py
  1. 從前序與中序遍歷序列構造二叉樹
    https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/105從前序與中序遍歷序列構造二叉樹.py
  1. 從中序與后序遍歷序列構造二叉樹
    https://leetcode-cn.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/106從中序與后序遍歷序列構造二叉樹.py
  1. 路徑總和
    https://leetcode-cn.com/problems/path-sum/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/112路徑總和.py
  1. 填充每個節(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
  1. 二叉搜索樹的最近公共祖先
    https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-search-tree/submissions/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/235二叉搜索樹的最近公共祖先.py
  1. 二叉樹的最近公共祖先
    https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/236二叉樹的最近公共祖先.py
  1. 二叉樹的序列化與反序列化
    https://leetcode-cn.com/problems/serialize-and-deserialize-binary-tree/
https://github.com/yangyu2010/leetcode/blob/master/二叉樹/297二叉樹的序列化與反序列化.py
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容