自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 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

原创 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

原创 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

原创 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

原创 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

原创 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

原创 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

原创 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

原创 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

原创 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

原创 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

原创 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

原创 Leetcode450 Delete Node in a BST

Problem Definitionsolution 1: Recursive

2020-04-07 08:29:17 123

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除