leetcode_Medium
文章平均质量分 73
雨狮子
这个作者很懒,什么都没留下…
展开
-
382. Linked List Random Node (蓄水池抽样,java)
382. Linked List Random Node DescriptionSubmissionsSolutionsTotal Accepted: 23716Total Submissions: 51037Difficulty: MediumContributor: LeetCode Given a singly linked list, return a原创 2017-04-10 15:27:57 · 878 阅读 · 0 评论 -
Leetcode 48. Min Cost Climbing Stairs
48. Min Cost Climbing Stairs On a staircase, the i-th step has some non-negative costcost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You need to find原创 2018-03-02 17:24:47 · 240 阅读 · 0 评论 -
Leetcode 62. Unique Paths
62. Unique PathsA 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 i原创 2018-03-02 13:55:25 · 226 阅读 · 0 评论 -
Leetcode 55. Jump Game
55. Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that positio原创 2018-03-01 16:08:58 · 474 阅读 · 0 评论 -
Leetcode 91. Decode Ways (string)
91. Decode WaysA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, det原创 2018-03-09 10:59:59 · 314 阅读 · 0 评论 -
Leetcode 49. Group Anagrams
49. Group AnagramsGiven an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], ["nat","tan"], ["原创 2018-02-03 20:18:53 · 217 阅读 · 0 评论 -
Leetcode 48. Rotate Image
48. Rotate ImageYou are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Note:You have to rotate the image in-place, which means you have to modify t原创 2018-02-03 17:50:57 · 213 阅读 · 0 评论 -
Leetcode 46. Permutations (全排列)
46. PermutationsDescriptionHintsSubmissionsDiscussSolutionGiven a collection of distinct numbers, return all possible permutations.For example,[1,2,3] have原创 2018-02-03 16:51:35 · 280 阅读 · 0 评论 -
Leetcode 15. 3Sum
15. 3SumGiven an array S of n integers, are there elements a,b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set must原创 2018-01-19 13:37:06 · 197 阅读 · 0 评论 -
Leetcode 29. Divide Two Integers
29. Divide Two IntegersDivide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT. 题目链接:https://leetcode.com/problems/divide-two-inte原创 2018-01-16 21:00:56 · 205 阅读 · 0 评论 -
Leetcode 3. Longest Substring Without Repeating Characters
3. Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which原创 2018-01-16 19:14:39 · 283 阅读 · 0 评论 -
Leetcode 39. Combination Sum (递归)
39. Combination Sum Given a set of candidate numbers (C)(without duplicates) and a target number (T), find all unique combinations inC where the candidate numbers sums to T.The same repeat原创 2018-01-23 20:00:46 · 358 阅读 · 0 评论 -
Leetcode 650. 2 Keys Keyboard
650. 2 Keys KeyboardInitially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step:Copy All: You can copy all the characters present on原创 2018-01-15 10:06:58 · 291 阅读 · 0 评论 -
Leetcode 542. 01 Matrix(BFS)
542. 01 MatrixGiven a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell.The distance between two adjacent cells is 1.Example 1: Input:0 0 00 1 00 0 0Out原创 2018-01-14 23:40:40 · 443 阅读 · 0 评论 -
leetcode 22. Generate Parentheses
Generate ParenthesesGiven 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-07-08 15:11:05 · 335 阅读 · 0 评论 -
102. Binary Tree Level Order Traversal (java)
102. Binary Tree Level Order Traversal DescriptionSubmissionsSolutionsTotal Accepted: 160620Total Submissions: 420955Difficulty: MediumContributor: LeetCode Given a binary tree,原创 2017-04-02 19:17:11 · 379 阅读 · 0 评论 -
Leetcode 74. Search a 2D Matrix
74. Search a 2D MatrixWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to rig原创 2018-03-04 18:19:45 · 262 阅读 · 0 评论