Leetcode

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

其他

  1. 两数之和
    https://leetcode-cn.com/problems/two-sum/
https://github.com/yangyu2010/leetcode/blob/master/leetcode/1两数之和.py
  1. 整数反转
    https://leetcode-cn.com/problems/reverse-integer/
https://github.com/yangyu2010/leetcode/blob/master/leetcode/7整数反转.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. 设计循环队列
    https://leetcode-cn.com/problems/design-circular-queue/
https://github.com/yangyu2010/leetcode/blob/master/队列/622循环队列.py

数组

  1. 移除元素
    https://leetcode-cn.com/problems/remove-element/
https://github.com/yangyu2010/leetcode/blob/master/数组/27移除元素.py
  1. 在排序数组中查找元素的第一个和最后一个位置
    https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/
https://github.com/yangyu2010/leetcode/blob/master/数组/34在排序数组中查找元素的第一个和最后一个位置.py
  1. 螺旋矩阵
    https://leetcode-cn.com/problems/spiral-matrix/
https://github.com/yangyu2010/leetcode/blob/master/数组/54螺旋矩阵.py
  1. 杨辉三角
    https://leetcode-cn.com/problems/pascals-triangle/
https://github.com/yangyu2010/leetcode/blob/master/数组/118杨辉三角.py
  1. 杨辉三角 II
    https://leetcode-cn.com/problems/pascals-triangle-ii/
https://github.com/yangyu2010/leetcode/blob/master/数组/119杨辉三角%20II.py
  1. 两数之和 II - 输入有序数组
    https://leetcode-cn.com/problems/two-sum-ii-input-array-is-sorted/
https://github.com/yangyu2010/leetcode/blob/master/数组/167两数之和II-输入有序数组.py
  1. 旋转数组
    https://leetcode-cn.com/problems/rotate-array/
https://github.com/yangyu2010/leetcode/blob/master/数组/189旋转数组.py
  1. 长度最小的子数组
    https://leetcode-cn.com/problems/minimum-size-subarray-sum/
https://github.com/yangyu2010/leetcode/blob/master/数组/209长度最小的子数组.py
  1. 最大连续1的个数
    https://leetcode-cn.com/problems/max-consecutive-ones/
https://github.com/yangyu2010/leetcode/blob/master/数组/485最大连续1的个数.py
  1. 对角线遍历
    https://leetcode-cn.com/problems/diagonal-traverse/
https://github.com/yangyu2010/leetcode/blob/master/数组/498对角线遍历.py
  1. 数组拆分 I
    https://leetcode-cn.com/problems/array-partition-i/
https://github.com/yangyu2010/leetcode/blob/master/数组/561数组拆分I.py
  1. 寻找数组的中心索引
    https://leetcode-cn.com/problems/find-pivot-index/
https://github.com/yangyu2010/leetcode/blob/master/数组/724寻找数组的中心索引.py
  1. 每日温度
    https://leetcode-cn.com/problems/daily-temperatures/
https://github.com/yangyu2010/leetcode/blob/master/数组/739每日温度.py
  1. 至少是其他数字两倍的最大数
    https://leetcode-cn.com/problems/largest-number-at-least-twice-of-others/
https://github.com/yangyu2010/leetcode/blob/master/数组/747至少是其他数字两倍的最大数.py

字符串

  1. 无重复字符的最长子串
    https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/
https://github.com/yangyu2010/leetcode/blob/master/字符串/3无重复字符的最长子串.py
  1. 字符串转换整数 (atoi)
    https://leetcode-cn.com/problems/string-to-integer-atoi/
https://github.com/yangyu2010/leetcode/blob/master/字符串/8字符串转换整数.py
  1. 最长公共前缀
    https://leetcode-cn.com/problems/longest-common-prefix/submissions/
https://github.com/yangyu2010/leetcode/blob/master/字符串/14最长公共前缀.py
  1. 实现 strStr()
    https://leetcode-cn.com/problems/implement-strstr/
https://github.com/yangyu2010/leetcode/blob/master/字符串/28实现strStr.py
  1. 二进制求和
    https://leetcode-cn.com/problems/a]
    [pohjlo;p[']
    d-binary/
https://github.com/yangyu2010/leetcode/blob/master/字符串/67二进制求和.py
  1. 翻转字符串里的单词
    https://leetcode-cn.com/problems/reverse-words-in-a-string/
https://github.com/yangyu2010/leetcode/blob/master/字符串/151翻转字符串里的单词.py
  1. 反转字符串
    https://leetcode-cn.com/problems/reverse-string/
https://github.com/yangyu2010/leetcode/blob/master/字符串/344反转字符串.py

链表

  1. 两数相加
    https://leetcode-cn.com/problems/add-two-numbers/
https://github.com/yangyu2010/leetcode/blob/master/链表/2两数相加.py
  1. 删除链表的倒数第N个节点
    https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/
https://github.com/yangyu2010/leetcode/blob/master/链表/19删除链表的倒数第N个节点.py
  1. 合并两个有序链表
    https://leetcode-cn.com/problems/merge-two-sorted-lists/
https://github.com/yangyu2010/leetcode/blob/master/链表/21合并两个有序链表.py
  1. 旋转链表
    https://leetcode-cn.com/problems/rotate-list/
https://github.com/yangyu2010/leetcode/blob/master/链表/61旋转链表.py
  1. 环形链表
    https://leetcode-cn.com/problems/linked-list-cycle/
https://github.com/yangyu2010/leetcode/blob/master/链表/141环形链表.py
  1. 环形链表 II
    https://leetcode-cn.com/problems/linked-list-cycle-ii/
https://github.com/yangyu2010/leetcode/blob/master/链表/142环形链表%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. 反转链表
    https://leetcode-cn.com/problems/reverse-linked-list/
https://github.com/yangyu2010/leetcode/blob/master/链表/206反转链表.py
  1. 回文链表
    https://leetcode-cn.com/problems/palindrome-linked-list/
https://github.com/yangyu2010/leetcode/blob/master/链表/234回文链表.py
  1. 删除链表中的节点
    https://leetcode-cn.com/problems/delete-node-in-a-linked-list/
https://github.com/yangyu2010/leetcode/blob/master/链表/237删除链表中的节点.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. 填充每个节点的下一个右侧节点指针
    https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node/
https://github.com/yangyu2010/leetcode/blob/master/二叉树/116填充每个节点的下一个右侧节点指针.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
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,457评论 5 459
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,837评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,696评论 0 319
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,183评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,057评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,105评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,520评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,211评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,482评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,574评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,353评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,213评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,576评论 3 298
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,897评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,174评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,489评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,683评论 2 335

推荐阅读更多精彩内容