
LeetCode
文章平均质量分 70
串烧
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 S I原创 2016-03-02 20:39:26 · 369 阅读 · 0 评论 -
Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->原创 2016-07-06 10:30:17 · 644 阅读 · 0 评论 -
Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at原创 2016-07-01 20:05:22 · 314 阅读 · 0 评论 -
Unique Paths II
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 and 0 respectively in the原创 2016-07-01 19:49:31 · 275 阅读 · 0 评论 -
Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the原创 2016-07-01 19:15:49 · 294 阅读 · 0 评论 -
Largest Rectangle in Histogram
参考 LeetCode: Largest Rectangle in Histogram(直方图最大面积)原创 2016-07-11 11:24:17 · 383 阅读 · 0 评论 -
Binary Tree Level Order Traversal II
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For example: Given binary tree [3,9,20,null,null,1原创 2016-06-13 19:46:44 · 316 阅读 · 0 评论 -
Longest Valid Parentheses
http://blog.youkuaiyun.com/yapian8/article/details/28239003?utm_source=tuicool&utm_medium=referral 个人觉得讲解的很好,易懂原创 2016-07-10 21:19:39 · 349 阅读 · 0 评论 -
Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20原创 2016-05-29 15:37:12 · 352 阅读 · 0 评论 -
Permutations
Given a collection of distinct numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. Arr原创 2016-03-23 16:49:52 · 370 阅读 · 0 评论 -
Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative. 大数相乘 //蠢法 public String multip原创 2016-03-23 15:36:43 · 388 阅读 · 0 评论 -
Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited numb原创 2016-03-18 21:07:30 · 357 阅读 · 0 评论 -
Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array.原创 2016-03-15 21:05:38 · 333 阅读 · 0 评论 -
Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found原创 2016-03-15 21:02:46 · 373 阅读 · 0 评论 -
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 as it is原创 2016-07-06 15:39:36 · 348 阅读 · 0 评论