![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
shiyi_1997
这个作者很懒,什么都没留下…
展开
-
Leetcode 435. Non-overlapping Intervals
Leetcode 435. Non-overlapping IntervalsProblemSolution:GreedyProblemGiven a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-ove...原创 2020-04-21 06:03:05 · 112 阅读 · 0 评论 -
leetcode 406. Queue Reconstruction by Height
leetcode 406. Queue Reconstruction by HeightProblemSolutionGreedyProblemSuppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h i...原创 2020-04-21 05:43:35 · 78 阅读 · 0 评论 -
leetcode 402 Remove K Digits
leetcode 402 Remove K DigitsProblemSolutions:GreedyProblemGiven a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.N...原创 2020-04-21 04:39:07 · 99 阅读 · 0 评论 -
leetcode 376. Wiggle Subsequence
leetcode 376. Wiggle SubsequenceProblemSolutionsgreedyProblemA sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and n...原创 2020-04-21 02:59:10 · 87 阅读 · 0 评论 -
Best time to buy and sell stockII
Best time to buy and sell stockIIProblem:Best Time to Buy and Sell Stock IISolutions 1: dynamic programmingSolutions 2 : greedy algorithmProblem:Best Time to Buy and Sell Stock II122 Best Time to B...原创 2020-04-20 09:13:43 · 77 阅读 · 0 评论 -
leetcode 55. Jump Game
leetcode 55. Jump GameProblemSolutions1.GreedyProblemGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your ...原创 2020-04-17 13:13:27 · 81 阅读 · 0 评论 -
leetcode 389. Find the Difference
leetcode 389. Find the DifferenceProblemSolutions1.Array2.Bit-manipulationProblemSolutions1.ArrayTo solve this problem. Firstly, i’d like to build an array with length of 26, where each element re...原创 2020-04-17 12:54:19 · 116 阅读 · 0 评论 -
leetcode 338. Counting Bits
leetcode 338. Counting BitsProblemSolutions1.Dynamic ProgrammingProblemGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their bina...原创 2020-04-17 12:23:10 · 63 阅读 · 0 评论 -
leetcode 405. Convert a Number to Hexadecimal
leetcode 405. Convert a Number to HexadecimalProblemSolutions:Bit-ManipulationProblemGiven an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method ...原创 2020-04-16 11:42:42 · 147 阅读 · 0 评论 -
Leetcode 137 Single Number II
Leetcode 137 Single Number IIProblem DefinitionSoluitons:1. Bit manipulationProblem DefinitionGiven a non-empty array of integers, every element appears three times except for one, which appears exa...原创 2020-04-10 07:23:04 · 87 阅读 · 0 评论 -
Leetcode 78 Subsets
Leetcode 78 SubsetsProblem DefinitionSolutionssolutions1: backtrackingProblem DefinitionGiven a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set mu...原创 2020-04-08 13:56:57 · 79 阅读 · 0 评论 -
Leetcode 449 Serialize and Deserialize BST
Leetcode 449 Serialize and Deserialize BSTProblem DefinitionSolutionssolution comes up by myselfSolutions two: Java PreOrder + Queue solutionProblem DefinitionSerialization is the process of convert...原创 2020-04-07 10:48:54 · 122 阅读 · 0 评论 -
Leetcode450 Delete Node in a BST
Problem Definitionsolution 1: Recursive原创 2020-04-07 08:29:17 · 123 阅读 · 0 评论