
Leetcode
Mrfive555
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[leetcode]First Missing Positive
题目 Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0] Output: 3 Example 2: Input: [3,4,-1,1] Output: 2 Exampl...原创 2018-09-08 19:23:27 · 156 阅读 · 0 评论 -
[leetcode] Create Maximum Number
Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k <= m + n from digits of the two. The relative order of the digits from the same ar...原创 2018-11-25 15:19:09 · 425 阅读 · 0 评论 -
[leetcode] Dungeon Game
题目 The demons had captured the princess § and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially po...原创 2018-11-17 22:23:35 · 210 阅读 · 0 评论 -
[leetcode] Delete and Earn
题目 Given an array nums of integers, you can perform operations on the array. In each operation, you pick any nums[i] and delete it to earn nums[i] points. After, you must delete every element equal to...原创 2018-11-10 17:19:17 · 253 阅读 · 0 评论 -
[leetcode] Super Egg Drop
题目 You are given K eggs, and you have access to a building with N floors from 1 to N. Each egg is identical in function, and if an egg breaks, you cannot drop it again. You know that there exists a fl...原创 2018-11-04 20:38:17 · 339 阅读 · 0 评论 -
[leetcode] Longest Valid Parentheses
题目 Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring. Example 1: Input: “(()” Output: 2 Explanation: The longest vali...原创 2018-10-27 17:22:21 · 253 阅读 · 0 评论 -
[leetcode] Wildcard Matching
题目 Given an input string (s) and a pattern §, implement wildcard pattern matching with support for ‘?’ and ‘*’. ‘?’ Matches any single character. ‘*’ Matches any sequence of characters (including the...原创 2018-10-21 21:40:44 · 199 阅读 · 0 评论 -
[leetcode] Redundant Connection II
题目 In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all other nodes are descendants of this node, plus every node has exactly one parent, ex...原创 2018-09-29 22:33:45 · 151 阅读 · 0 评论 -
[leetcode] Merge Intervals
题目 Given a collection of intervals, merge all overlapping intervals. Example 1: Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlap...原创 2018-10-06 21:23:55 · 264 阅读 · 0 评论 -
[leetcode] Similar String Groups
题目 Two strings X and Y are similar if we can swap two letters (in different positions) of X, so that it equals Y. For example, “tars” and “rats” are similar (swapping at positions 0 and 2), and “rats”...原创 2018-10-13 10:31:11 · 340 阅读 · 0 评论 -
[Leetcode] K-Similar Strings
题目 Strings A and B are K-similar (for some non-negative integer K) if we can swap the positions of two letters in A exactly K times so that the resulting string equals B. Given two anagrams A and B, r...原创 2018-09-22 13:02:32 · 379 阅读 · 0 评论 -
[leetcode]Jump Game II
题目 Given 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 position. Your goal i...原创 2018-09-13 00:39:41 · 243 阅读 · 0 评论 -
[leetcode] Word Ladder II
题目 Given two words (beginWord and endWord), and a dictionary’s word list, find all shortest transformation sequence(s) from beginWord to endWord, such that: Only one letter can be changed at a time Ea...原创 2018-12-05 10:52:50 · 246 阅读 · 0 评论