![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 64
SYSUZZY
这个作者很懒,什么都没留下…
展开
-
215. Kth Largest Element in an Array
215. Kth Largest Element in an ArrayFind the k th largest element in an unsorted array. Note that it is the k th largest element in the sorted order, not the kth distinct element.For example, Given [3原创 2017-09-24 12:43:20 · 138 阅读 · 0 评论 -
399. Evaluate Division
399. Evaluate DivisionEquations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the ans原创 2018-01-02 16:25:07 · 133 阅读 · 0 评论 -
744. Network Delay Time
744. Network Delay TimeThere are N network nodes, labelled 1 to N.Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the target node, and w is原创 2018-01-02 16:21:18 · 168 阅读 · 0 评论 -
698. Partition to K Equal Sum Subsets
698. Partition to K Equal Sum SubsetsGiven an array of integers nums and a positive integer k, find whether it’s possible to divide this array into k non-empty subsets whose sums are all equal. Exampl原创 2017-12-06 19:45:05 · 174 阅读 · 0 评论 -
740. Delete and Earn
740. Delete and EarnGiven 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 e原创 2017-12-13 21:33:13 · 146 阅读 · 0 评论 -
210. Course Schedule II
210. Course Schedule II在上一篇博客中,我们利用了入度来判断图中是否存在一个拓扑序列,而在本次博客中,我们将探讨如何找出拓扑序列。题目: There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for exampl原创 2017-11-16 13:54:58 · 138 阅读 · 0 评论 -
406. Queue Reconstruction by Height
406. Queue Reconstruction by HeightSuppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the原创 2017-10-23 13:36:26 · 147 阅读 · 0 评论 -
207. Course Schedule
207. Course Schedule接下来的三篇博客是有关于拓扑排序在题目中的应用,难度循序渐进,通过这三题来彻底把拓扑排序的方法牢牢掌握吧!题目: There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example t原创 2017-11-16 13:36:08 · 114 阅读 · 0 评论 -
712. Minimum ASCII Delete Sum for Two Strings
712. Minimum ASCII Delete Sum for Two StringsGiven two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal. Example 1:Input: s1 = "sea", s2 = "eat" Output: 231 Ex原创 2017-11-29 21:47:18 · 156 阅读 · 0 评论 -
714. Best Time to Buy and Sell Stock with Transaction Fee
714. Best Time to Buy and Sell Stock with Transaction FeeYour are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer fee re原创 2017-11-29 19:37:03 · 137 阅读 · 0 评论 -
718. Maximum Length of Repeated Subarray
718. Maximum Length of Repeated SubarrayGiven two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1:Input: A: [1,2,3,2,1] B: [3,2,1,4,7] Output: 3原创 2017-11-02 08:44:26 · 604 阅读 · 0 评论 -
659. Split Array into Consecutive Subsequences
659. Split Array into Consecutive SubsequencesYou are given an integer array sorted in ascending order (may contain duplicates), you need to split them into several subsequences, where each subsequence原创 2017-10-15 14:55:16 · 200 阅读 · 0 评论 -
547. Friend Circles
547. Friend CirclesThere are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a direct原创 2017-10-02 09:51:31 · 161 阅读 · 0 评论 -
240. Search a 2D Matrix II
Add to List 240. Search a 2D Matrix IIWrite 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 in ascending f原创 2017-10-02 00:17:58 · 123 阅读 · 0 评论 -
241. Different Ways to Add Parentheses
241. Different Ways to Add ParenthesesGiven a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid opera原创 2017-09-17 17:05:52 · 173 阅读 · 0 评论 -
670. Maximum Swap
670. Maximum SwapQuestion:Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get.Example 1: Input: 2736原创 2017-09-10 11:43:32 · 193 阅读 · 0 评论 -
576. Out of Boundary Paths
576. Out of Boundary PathsThere is an m by n grid with a ball. Given the start coordinate (i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary in four directions (up, do原创 2018-01-22 16:17:50 · 119 阅读 · 0 评论