Leetcode
文章平均质量分 63
felinewong
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode: generate-parentheses
问题: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(()原创 2017-02-16 20:49:47 · 302 阅读 · 0 评论 -
Leetcode: max-points-on-a-line
题目: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 思路: 1.每个点与其他点进行比较 2.用Map来保存斜率,两个点之间有三种关系 (1)重复,用dup来保存重复数量 (2)垂直,用vcnt来保存垂直数量 (3)倾斜,用原创 2017-03-21 17:33:34 · 257 阅读 · 0 评论 -
Leetcode: 股票买卖大全
题目一:best-time-to-buy-and-sell-stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy原创 2017-03-19 23:43:37 · 463 阅读 · 0 评论 -
Leetcode: reverse-nodes-in-k-group
题目: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain原创 2017-02-15 23:27:10 · 368 阅读 · 0 评论 -
Leetcode: trapping-rain-water
题目: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For example, Given[0,1,0,2,1,0,1,3,2,原创 2017-02-10 23:15:34 · 234 阅读 · 0 评论 -
Leetcode: longest-substring-without-repeating-characters
题目: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is原创 2017-02-19 21:32:40 · 225 阅读 · 0 评论 -
Leetcode: longest-palindromic-substring
题目: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 思路: 1.原创 2017-02-17 23:22:04 · 211 阅读 · 0 评论 -
Leetcode: zigzag-conversion
题目: The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L原创 2017-02-17 22:42:51 · 194 阅读 · 0 评论 -
Leetcode: word-break
题目一:word-break Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s ="leet原创 2017-03-23 22:47:44 · 263 阅读 · 0 评论
分享