08 2019 档案
摘要:原题链接在这里:https://leetcode.com/problems/number-of-corner-rectangles/ 题目: Given a grid where each entry is only 0 or 1, find the number of corner rectang
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/minimum-falling-path-sum/ 题目: Given a square array of integers A, we want the minimum sum of a falling path thro
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/stone-game-ii/ 题目: Alex and Lee continue their games with piles of stones. There are a number of piles arranged
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/stone-game/ 题目: Alex and Lee play a game with piles of stones. There are an even number of piles arranged in a r
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/circular-array-loop/ 题目: You are given a circular array nums of positive and negative integers. If a number k at
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/boats-to-save-people/ 题目: The i-th person has weight people[i], and each boat can carry a maximum weight of limi
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/candy-crush/ 题目: This question is about implementing a basic elimination algorithm for Candy Crush. Given a 2D i
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/push-dominoes/ 题目: There are N dominoes in a line, and we place each domino vertically upright. In the beginning
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/statistics-from-a-large-sample/ 题目: We sampled integers between 0 and 255, and stored the results in an array co
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/interval-list-intersections/ 题目: Given two lists of closed intervals, each list of intervals is pairwise disjoin
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/longest-word-in-dictionary-through-deleting/ 题目: Given a string and a string dictionary, find the longest string
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/max-consecutive-ones-iii/ 题目: Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return th
阅读全文
摘要:原题链接在这里: 题目: In a row of trees, the i-th tree produces fruit with type tree[i]. You start at any tree of your choice, then repeatedly perform the foll
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/binary-subarrays-with-sum/ 题目: In an array A of 0s and 1s, how many non-empty subarrays have sum S? Example 1: N
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/most-profit-assigning-work/ 题目: We have jobs: difficulty[i] is the difficulty of the ith job, and profit[i] is t
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/3sum-with-multiplicity/ 题目: Given an integer array A, and an integer target, return the number of tuples i, j, k
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/two-sum-less-than-k/ 题目: Given an array A of integers and integer K, return the maximum S such that there exists
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/shortest-distance-to-a-character/ 题目: Given a string S and a character C, return an array of integers representi
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/max-chunks-to-make-sorted-ii/ 题目: This question is the same as "Max Chunks to Make Sorted" except the integers o
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/max-chunks-to-make-sorted/ 题目: Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/longest-mountain-in-array/ 题目: Let's call any (contiguous) subarray B (of A) a mountain if the following propert
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/all-paths-from-source-lead-to-destination/ 题目: Given the edges of a directed graph, and two nodes source and des
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/shortest-path-with-alternating-colors/ 题目: Consider a directed graph, with nodes labelled 0, 1, ..., n-1. In thi
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/is-graph-bipartite/ 题目: Given an undirected graph, return true if and only if it is bipartite. Recall that a gra
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/find-eventual-safe-states/ 题目: In a directed graph, we start at some node and every turn, walk along a directed
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/partition-array-for-maximum-sum/ 题目: Given an integer array A, you partition the array into (contiguous) subarra
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/keys-and-rooms/ 题目: There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ...,
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/lexicographically-smallest-equivalent-string/ 题目: Given strings A and B of the same length, we say A[i] and B[i]
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/path-with-maximum-minimum-value/ 题目: Given a matrix of integers A with R rows and C columns, find the maximum sc
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/connecting-cities-with-minimum-cost/ 题目: There are N cities numbered from 1 to N. You are given connections, whe
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/the-earliest-moment-when-everyone-become-friends/ 题目: In a social group, there are N people, with unique integer
阅读全文