flowingfog

偶尔刷题

  博客园  :: 首页  :: 新随笔  :: 联系 ::  :: 管理

2018年11月12日

摘要: 分析 难度 易 来源 https://leetcode.com/problems/excel-sheet-column-title/ 十进制转26进制 注意,z表示26,而非0 题目 Given a positive integer, return its corresponding column 阅读全文
posted @ 2018-11-12 17:32 flowingfog 阅读(117) 评论(0) 推荐(0) 编辑

摘要: 分析 难度 易 来源 https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ 题目 Given an array of integers that is already sorted in ascending order, fi 阅读全文
posted @ 2018-11-12 16:20 flowingfog 阅读(101) 评论(0) 推荐(0) 编辑

2018年11月10日

摘要: 分析 难度 易 来源 https://leetcode.com/problems/intersection-of-two-linked-lists/ 把第一个链表的结尾指向第二个链表的开头。 如果两个链表有交集,则新的链表有环 环的开始处即两个链表交集的起始节点 题目 Write a program 阅读全文
posted @ 2018-11-10 23:30 flowingfog 阅读(102) 评论(0) 推荐(0) 编辑

2018年11月9日

摘要: 分析 难度 易 来源 https://leetcode.com/problems/min-stack/ 题目 Design a stack that supports push, pop, top, and retrieving the minimum element in constant tim 阅读全文
posted @ 2018-11-09 22:38 flowingfog 阅读(98) 评论(0) 推荐(0) 编辑

2018年11月8日

摘要: 分析 难度 中 来源 https://leetcode.com/problems/find-the-duplicate-number/ 题目 Given an array nums containing n + 1 integers where each integer is between 1 a 阅读全文
posted @ 2018-11-08 15:27 flowingfog 阅读(93) 评论(0) 推荐(0) 编辑

2018年11月7日

摘要: 分析 难度 中 来源 https://leetcode.com/problems/linked-list-cycle-ii 环之前节点数 a;从环起始节点到快慢指针相遇位置,节点数 b 快慢指针fast slow相遇,慢指针走过 a+b,快指针走过2*(a+b) 快慢指针相遇时,创建第二个慢指针 s 阅读全文
posted @ 2018-11-07 22:45 flowingfog 阅读(80) 评论(0) 推荐(0) 编辑

摘要: 分析 难度 易 来源 https://leetcode.com/problems/linked-list-cycle/ 题目 Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it wit 阅读全文
posted @ 2018-11-07 16:57 flowingfog 阅读(69) 评论(0) 推荐(0) 编辑

2018年11月6日

摘要: 分析 参考https://cloud.tencent.com/developer/article/1131945 我们想要达到的效果其实是—— a b 初始状态 : 0 0 第一次碰见某个数x: 0 x(把x记录在b中) 第二次碰见某个数x: x 0(把x记录在a中) 第三次碰见某个数x: 0 0( 阅读全文
posted @ 2018-11-06 22:31 flowingfog 阅读(91) 评论(0) 推荐(0) 编辑

摘要: 分析 难度 易 来源 https://leetcode.com/problems/single-number 题目 Given a non-empty array of integers, every element appears twice except for one. Find that s 阅读全文
posted @ 2018-11-06 20:53 flowingfog 阅读(87) 评论(0) 推荐(0) 编辑

摘要: 分析 难度 易 来源 https://leetcode.com/problems/valid-palindrome/ 题目 Given a string, determine if it is a palindrome, considering only alphanumeric character 阅读全文
posted @ 2018-11-06 10:13 flowingfog 阅读(87) 评论(0) 推荐(0) 编辑