LeetCode 864. Shortest Path to Get All Keys

864. Shortest Path to Get All Keys We are given a 2-dimensional grid. “.” is an empty cell, “#” is a wall, “@” is the starting point, (“a”, “b”, …) a...

2019-02-24 16:45:30

阅读数 55

评论数 0

LeetCode 502.IPO

502.IPO Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some...

2019-02-23 17:36:55

阅读数 19

评论数 0


题目描述 小易将n个棋子摆放在一张无限大的棋盘上。第i个棋子放在第x[i]行y[i]列。同一个格子允许放置多个棋子。每一次操作小易可以把一个棋子拿起并将其移动到原格子的上、下、左、右的任意一个格子中。小易想知道要让棋盘上出现有一个格子中至少有i(1 ≤ i ≤ n)个棋子所需要的最少操作次数. 输...

2019-02-21 18:44:24

阅读数 48

评论数 0

LeetCode 76. Minimum Window Substring

76. Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O...

2019-02-17 19:29:18

阅读数 25

评论数 0

LeetCode 72. Edit Distance

72. Edit Distance Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3...

2019-02-17 16:27:22

阅读数 24

评论数 0

LeetCode 68. Text Justification

68. Text Justification Given an array of words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully...

2019-02-17 15:35:41

阅读数 14

评论数 0

LeetCode 899. Orderly Queue

899. Orderly Queue A string S of lowercase letters is given. Then, we may make any number of moves. In each move, we choose one of the first K lette...

2019-02-16 16:45:09

阅读数 18

评论数 0

LeetCode 44. Wildcard Matching

44. Wildcard Matching Given an input string (s) and a pattern §, implement wildcard pattern matching with support for ‘?’ and ‘*’. '?' Matches any si...

2019-02-16 15:17:11

阅读数 28

评论数 0

LeetCode 30. Substring with Concatenation of All Words

30. Substring with Concatenation of All Words You are given a string, s, and a list of words, words, that are all of the same length. Find all starti...

2019-02-14 19:34:56

阅读数 31

评论数 1

LeetCode 10. Regular Expression Matching

10. Regular Expression Matching Given an input string (s) and a pattern §, implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Ma...

2019-02-14 15:21:57

阅读数 13

评论数 0

Leetcode 4. Median of Two Sorted Arrays

4. Median of Two Sorted Arrays There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. Th...

2019-02-13 20:07:17

阅读数 27

评论数 0

LeetCode 218. The Skyline Problem

A city’s skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are giv...

2019-02-13 17:19:01

阅读数 24

评论数 0

LeetCode 316. Remove Duplicate Letters

(自己开发的博客,欢迎访问)https://www.weiboke.online 316. Remove Duplicate Letters Given a string which contains only lowercase letters, remove duplicate letters...

2019-02-11 17:08:00

阅读数 46

评论数 0

leetcode 895. Maximum Frequency Stack

895. Maximum Frequency Stack Implement FreqStack, a class which simulates the operation of a stack-like data structure. FreqStack has two functions: ...

2019-02-11 16:00:01

阅读数 70

评论数 0

leetcode 85. Maximal Rectangle

Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area. Example: Input: [ [“1”,“0”,“1”,...

2019-02-03 22:10:26

阅读数 19

评论数 0

LeetCode 42. Trapping Rain Water

42. 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 ab...

2019-02-03 20:04:41

阅读数 26

评论数 0

leetcode 880. Decoded String at Index

880. Decoded String at Index An encoded string S is given. To find and write the decoded string to a tape, the encoded string is read one character ...

2019-02-03 17:03:18

阅读数 22

评论数 0

907. Sum of Subarray Minimums

欢迎访问我的博客网站 https://www.weiboke.online/posts/page 907. Sum of Subarray Minimums Given an array of integers A, find the sum of min(B), where B ranges o...

2019-02-03 16:14:24

阅读数 17

评论数 0

leetcode 385. Mini Parser

385. Mini Parser Given a nested list of integers represented as a string, implement a parser to deserialize it. Each element is either an integer, or...

2019-02-02 14:11:18

阅读数 25

评论数 0

Leetcode 173. Binary Search Tree Iterator

173. Binary Search Tree Iterator Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST...

2019-02-02 09:54:23

阅读数 42

评论数 0

取消 删除