![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Medium
Joyer_99
这个作者很懒,什么都没留下…
展开
-
【Leetcode】3. Longest Substring Without Repeating Characters [Medium]
DescriptionGiven a string, find the length of the longest substring without repeating characters.ExampleExample1:Input: "abcabcbb"Output: 3 Explanation: The answer is "abc", with the length of 3...原创 2019-09-04 10:55:38 · 67 阅读 · 0 评论 -
【Leetcode】207. Course Schedule[Medium]
DescriptionThere are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expresse...原创 2019-10-05 14:25:33 · 105 阅读 · 0 评论 -
【Leetcode】79. Word Search[Medium]
DescriptionGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizontally or v...原创 2019-09-07 14:52:03 · 79 阅读 · 0 评论 -
【Leetcode】347. Top K Frequent Elements[Medium]
DescriptionGiven a non-empty array of integers, return the k most frequent elements.ExampleExample 1:Input: nums = [1,1,1,2,2,3], k = 2Output: [1,2]Example 2:Input: nums = [1], k = 1Output: [...原创 2019-09-07 22:50:09 · 90 阅读 · 0 评论 -
【Leetcode】162. Find Peak Element[Medium]
DescriptionA peak element is an element that is greater than its neighbors.Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return its index.The array may contain multi...原创 2019-09-08 14:59:46 · 178 阅读 · 0 评论 -
【Leetcode】33. Search in Rotated Sorted Array[Medium]
DescriptionSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are given a target value to search....原创 2019-09-11 11:24:19 · 84 阅读 · 0 评论 -
【Leetcode】322. Coin Change[Medium]
DescriptionYou are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amou...原创 2019-09-11 14:59:17 · 94 阅读 · 0 评论 -
【Leetcode】300. Longest Increasing Subsequence[Medium]
DescriptionGiven an unsorted array of integers, find the length of longest increasing subsequence.Note:There may be more than one LIS combination, it is only necessary for you to return the length...原创 2019-09-11 16:59:16 · 118 阅读 · 0 评论 -
【Leetcode】621. Task Scheduler[Medium]
DescriptionGiven a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks. Tasks could be done without original order. Each...原创 2019-09-17 15:27:41 · 71 阅读 · 0 评论 -
【Leetcode】238. Product of Array Except Self[Medium]
DescriptionGiven an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Note: Please solve it with...原创 2019-09-26 16:38:39 · 79 阅读 · 0 评论 -
【Leetcode】230. Kth Smallest Element in a BST[Medium]
DescriptionGiven a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST’s total elements.ExampleExample 1:In...原创 2019-09-07 13:32:22 · 67 阅读 · 0 评论 -
【Leetcode】73. Set Matrix Zeroes[Medium]
DescriptionGiven a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.Follow up:A straight forward solution using O(mn) space is probably a bad idea.A simple imp...原创 2019-09-06 15:12:49 · 81 阅读 · 0 评论 -
【Leetcode】98. Validate Binary Search Tree[Medium]
DescriptionGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than the node’s...原创 2019-09-05 11:59:41 · 141 阅读 · 0 评论 -
【Leetcode】210. Course Schedule II[Medium]
DescriptionThere are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expresse...原创 2019-10-05 14:54:23 · 93 阅读 · 0 评论