flowingfog

偶尔刷题

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

11 2018 档案

摘要:分析 难度 易 来源 https://leetcode.com/problems/valid-phone-numbers/ 题目 Given a text file file.txt that contains list of phone numbers (one per line), write 阅读全文
posted @ 2018-11-26 20:30 flowingfog 阅读(321) 评论(0) 推荐(0)

摘要:分析 写bash,不太会啊…… 难度 中 来源 https://leetcode.com/problems/word-frequency/ 题目 Write a bash script to calculate the frequency of each word in a text file wo 阅读全文
posted @ 2018-11-26 16:17 flowingfog 阅读(241) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/number-of-1-bits/ 题目 Write a function that takes an unsigned integer and returns the number of '1' bits it ha 阅读全文
posted @ 2018-11-25 20:23 flowingfog 阅读(188) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/reverse-bits/submissions/ 题目 Reverse bits of a given 32 bits unsigned integer. Example: Follow up: If this fu 阅读全文
posted @ 2018-11-25 20:07 flowingfog 阅读(182) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/rotate-array/submissions/ 题目 Given an array, rotate the array to the right by k steps, where k is non-negativ 阅读全文
posted @ 2018-11-18 22:36 flowingfog 阅读(149) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/customers-who-never-order/ 题目 Suppose that a website contains two tables, the Customers table and the Orders 阅读全文
posted @ 2018-11-18 11:02 flowingfog 阅读(150) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/combine-two-tables/ SQL LEFT JOIN 关键字 LEFT JOIN 关键字会从左表 (table_name1) 那里返回所有的行,即使在右表 (table_name2) 中没有匹配的行。 L 阅读全文
posted @ 2018-11-16 15:04 flowingfog 阅读(144) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/factorial-trailing-zeroes/ 题目 Given an integer n, return the number of trailing zeroes in n!. Example 1: Exam 阅读全文
posted @ 2018-11-16 11:15 flowingfog 阅读(170) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/excel-sheet-column-number 题目 Given a column title as appear in an Excel sheet, return its corresponding colum 阅读全文
posted @ 2018-11-14 10:37 flowingfog 阅读(192) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/majority-element/ JDK里的排序算法,效率就是高啊 题目 Given an array of size n, find the majority element. The majority eleme 阅读全文
posted @ 2018-11-14 10:19 flowingfog 阅读(108) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 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 阅读(126) 评论(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 阅读(107) 评论(0) 推荐(0)

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

摘要:分析 难度 易 来源 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 阅读(110) 评论(0) 推荐(0)

摘要:分析 难度 中 来源 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 阅读(98) 评论(0) 推荐(0)

摘要:分析 难度 中 来源 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 阅读(87) 评论(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 阅读(75) 评论(0) 推荐(0)

摘要:分析 参考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 阅读(106) 评论(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 阅读(95) 评论(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 阅读(93) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ 题目 Say you have an array for which the ith element is the price of a give 阅读全文
posted @ 2018-11-05 11:17 flowingfog 阅读(109) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ 题目 Say you have an array for which the ith element is the price of a given s 阅读全文
posted @ 2018-11-05 10:58 flowingfog 阅读(124) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/minimum-depth-of-binary-tree 题目 Given a binary tree, find its minimum depth. The minimum depth is the number 阅读全文
posted @ 2018-11-04 16:15 flowingfog 阅读(109) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/balanced-binary-tree/ 题目 Given a binary tree, determine if it is height-balanced. For this problem, a height- 阅读全文
posted @ 2018-11-04 15:17 flowingfog 阅读(116) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ 题目 Given an array where elements are sorted in ascending order, c 阅读全文
posted @ 2018-11-04 10:31 flowingfog 阅读(186) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/pascals-triangle-ii/ 题目 Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's t 阅读全文
posted @ 2018-11-02 11:41 flowingfog 阅读(154) 评论(0) 推荐(0)

摘要:分析 难度 易 来源 https://leetcode.com/problems/pascals-triangle/ 题目 Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. I 阅读全文
posted @ 2018-11-01 09:25 flowingfog 阅读(191) 评论(0) 推荐(0)