![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
Charles-Liu
这个作者很懒,什么都没留下…
展开
-
Guess Number Higher or Lower
[leetcode]Guess Number Higher or Lower链接:https://leetcode.com/problems/guess-number-higher-or-lower/description/QuestionWe are playing the Guess Game. The game is as follows:I pick a number ...原创 2018-08-11 22:20:19 · 135 阅读 · 0 评论 -
Decode Ways
[leetcode]Decode Ways链接:https://leetcode.com/problems/decode-ways/description/QuestionA message containing letters from A-Z is being encoded to numbers using the following mapping:‘A’ -> ...原创 2018-08-07 22:30:58 · 157 阅读 · 0 评论 -
Maximal Square
[leetcode]Maximal Square链接:https://leetcode.com/problems/maximal-square/description/QuestionGiven a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and re...原创 2018-08-07 22:31:47 · 84 阅读 · 0 评论 -
Maximum Product Subarray
[leetcode]Maximum Product Subarray链接:https://leetcode.com/problems/maximum-product-subarray/description/QuestionGiven an integer array nums, find the contiguous subarray within an array (...原创 2018-08-07 22:32:10 · 115 阅读 · 0 评论 -
Number of Longest Increasing Subsequence
[leetcode]Number of Longest Increasing Subsequence链接:https://leetcode.com/problems/additive-number/description/QuestionGiven an unsorted array of integers, find the number of longest increasin...原创 2018-08-07 22:32:30 · 108 阅读 · 0 评论 -
Range Sum Query 2D - Immutable
[leetcode]Range Sum Query 2D - Immutable链接:https://leetcode.com/problems/range-sum-query-2d-immutable/QuestionGiven a 2D matrix matrix, find the sum of the elements inside the rectangle define...原创 2018-08-07 22:33:23 · 151 阅读 · 0 评论 -
Restore IP Addresses
[leetcode]Restore IP Addresses链接:https://leetcode.com/problems/restore-ip-addresses/description/QuestionGiven a string containing only digits, restore it by returning all possible valid IP add...原创 2018-08-07 22:33:41 · 75 阅读 · 0 评论 -
Word Search
[leetcode]Word Search链接:https://leetcode.com/problems/word-search/description/QuestionGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letter...原创 2018-08-07 22:34:00 · 102 阅读 · 0 评论 -
Largest Divisible Subset
[leetcode]Largest Divisible Subset链接:https://leetcode.com/problems/largest-divisible-subset/description/QuestionGiven a set of distinct positive integers, find the largest subset such that eve...原创 2018-08-12 21:53:12 · 101 阅读 · 0 评论 -
Minimum Absolute Difference in BST
[leetcode]Minimum Absolute Difference in BST链接:https://leetcode.com/problems/minimum-absolute-difference-in-bst/description/QuestionGiven a binary search tree with non-negative values, find th...原创 2018-08-12 21:53:49 · 154 阅读 · 0 评论 -
Cheapest Flights Within K Stops
[leetcode]Cheapest Flights Within K Stops链接:https://leetcode.com/problems/cheapest-flights-within-k-stops/description/QuestionThere are n cities connected by m flights. Each fight starts from ...原创 2018-08-07 22:30:28 · 292 阅读 · 0 评论 -
Additive Number
[leetcode]Additive Number链接:https://leetcode.com/problems/additive-number/description/QuestionAdditive number is a string whose digits can form additive sequence.A valid additive sequence sh...原创 2018-08-07 22:29:54 · 125 阅读 · 0 评论 -
Increasing Subsequences
[leetcode]Increasing Subsequences链接:https://leetcode.com/problems/increasing-subsequences/description/QuestionGiven an integer array, your task is to find all the different possible increasing...原创 2018-08-11 22:20:37 · 83 阅读 · 0 评论 -
Jump Game
[leetcode]Jump Game链接:https://leetcode.com/problems/jump-game/description/QuestionGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each e...原创 2018-08-11 22:21:14 · 98 阅读 · 0 评论 -
K-th Symbol in Grammar
[leetcode]K-th Symbol in Grammar链接:https://leetcode.com/problems/reorganize-string/description/QuestionOn the first row, we write a 0. Now in every subsequent row, we look at the previous row ...原创 2018-08-11 22:21:32 · 137 阅读 · 0 评论 -
Length of Longest Fibonacci Subsequence
[leetcode]Length of Longest Fibonacci Subsequence链接:https://leetcode.com/problems/length-of-longest-fibonacci-subsequence/description/QuestionA sequence X_1, X_2, ..., X_n is fibonacci-like if...原创 2018-08-02 22:22:32 · 377 阅读 · 0 评论 -
Coin Change
[leetcode]Coin Change链接:https://leetcode.com/problems/coin-change/description/QuestionYou are given coins of different denominations and a total amount of money amount. Write a function t...原创 2018-08-02 22:23:02 · 142 阅读 · 0 评论 -
Largest Sum of Averages
[leetcode]Largest Sum of Averages链接:https://leetcode.com/problems/largest-sum-of-averages/description/QuestionWe partition a row of numbers A into at most K adjacent (non-empty) groups, then o...原创 2018-08-02 22:23:37 · 133 阅读 · 0 评论 -
Maximum Length of Repeated Subarray
[leetcode]Maximum Length of Repeated Subarray链接:https://leetcode.com/problems/maximum-length-of-repeated-subarray/description/QuestionGiven two integer arrays A and B, return th...原创 2018-08-02 22:24:15 · 117 阅读 · 0 评论 -
Minimum Swaps To Make Sequences Increasing
[leetcode]Minimum Swaps To Make Sequences Increasing链接:https://leetcode.com/problems/maximum-length-of-repeated-subarray/description/QuestionWe have two integer sequences A and B of the same n...原创 2018-08-02 22:24:37 · 138 阅读 · 0 评论 -
Best Time to Buy and Sell Stock with Cooldown
[leetcode]Best Time to Buy and Sell Stock with Cooldown链接:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/description/QuestionSay you have an array for which the i*...原创 2018-08-02 22:24:56 · 95 阅读 · 0 评论 -
Minimum Path Sum
[leetcode]Minimum Path Sum链接:https://leetcode.com/problems/minimum-path-sum/description/QuestionGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right w...原创 2018-08-12 21:54:12 · 97 阅读 · 0 评论 -
Monotone Increasing Digits
[leetcode]Monotone Increasing Digits链接:https://leetcode.com/problems/monotone-increasing-digits/description/QuestionGiven a non-negative integer N, find the largest number that is less than or...原创 2018-08-12 21:54:38 · 149 阅读 · 0 评论 -
Non-overlapping Intervals
[leetcode]Non-overlapping Intervals链接:https://leetcode.com/problems/non-overlapping-intervals/description/QuestionGiven a collection of intervals, find the minimum number of intervals you need...原创 2018-08-08 22:33:33 · 113 阅读 · 0 评论 -
Partition Labels
[leetcode]Partition Labels链接:https://leetcode.com/problems/partition-labels/description/QuestionA string S of lowercase letters is given. We want to partition this string into as many parts as...原创 2018-08-08 22:33:55 · 119 阅读 · 0 评论 -
Queue Reconstruction by Height
[leetcode]Queue Reconstruction by Height链接:https://leetcode.com/problems/queue-reconstruction-by-height/description/QuestionSuppose you have a random list of people standing in a queue. Each p...原创 2018-08-08 22:34:17 · 123 阅读 · 0 评论 -
Score After Flipping Matrix
[leetcode]Score After Flipping Matrix链接:https://leetcode.com/problems/score-after-flipping-matrix/description/QuestionWe have a two dimensional matrix A where each value is 0 or 1.A move con...原创 2018-08-08 22:34:41 · 113 阅读 · 0 评论 -
Walking Robot Simulation
[leetcode]Walking Robot Simulation链接:https://leetcode.com/problems/walking-robot-simulation/description/QuestionA robot on an infinite grid starts at point (0, 0) and faces north. The robot c...原创 2018-08-08 22:35:03 · 210 阅读 · 0 评论 -
Beautiful Arrangement
[leetcode]Beautiful Arrangement链接:https://leetcode.com/problems/beautiful-arrangement/description/QuestionSuppose you have N integers from 1 to N. We define a beautiful arrangement as an array...原创 2018-08-27 11:09:48 · 257 阅读 · 0 评论 -
week16-leetcode #198-House Robber
week16-leetcode #198-House Robber链接:https://leetcode.com/problems/house-robber/description/QuestionYou are a professional robber planning to rob houses along a street. Each house has a certain amount o原创 2017-12-27 21:58:52 · 150 阅读 · 0 评论 -
Unique Binary Search Trees II
[leetcode]Unique Binary Search Trees II链接:https://leetcode.com/problems/unique-binary-search-trees-ii/description/QuestionGiven an integer n, generate all structurally unique BST’s (binary sea...原创 2018-08-21 18:59:55 · 116 阅读 · 0 评论 -
Unique Substrings in Wraparound String
[leetcode]Unique Substrings in Wraparound String链接:https://leetcode.com/problems/unique-substrings-in-wraparound-string/description/QuestionConsider the string s to be the infinite wraparound ...原创 2018-08-21 19:07:31 · 146 阅读 · 0 评论 -
New 21 Game
[leetcode]New 21 Game链接:https://leetcode.com/problems/new-21-game/description/QuestionAlice plays the following game, loosely based on the card game “21”.Alice starts with 0 points, and draw...原创 2018-08-08 22:33:12 · 232 阅读 · 0 评论 -
Minimum Number of Arrows to Burst Balloons
[leetcode]Minimum Number of Arrows to Burst Balloons链接:https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/description/QuestionThere are a number of spherical balloons spr...原创 2018-08-08 22:32:47 · 126 阅读 · 0 评论 -
My Calendar II
[leetcode]My Calendar II链接:https://leetcode.com/problems/my-calendar-ii/QuestionImplement a MyCalendarTwo class to store your events. A new event can be added if adding the event will not caus...原创 2018-08-12 21:55:24 · 162 阅读 · 0 评论 -
Ones and Zeroes
[leetcode]Ones and Zeroes链接:https://leetcode.com/problems/ones-and-zeroes/description/QuestionIn the computer world, use restricted resource you have to generate maximum benefit is what we alw...原创 2018-08-12 21:55:42 · 153 阅读 · 0 评论 -
Out of Boundary Paths
[leetcode]Out of Boundary Paths链接:https://leetcode.com/problems/out-of-boundary-paths/description/QuestionThere is an m by n grid with a ball. Given the start coordinate&nb...原创 2018-08-12 21:55:58 · 281 阅读 · 0 评论 -
Partition Equal Subset Sum.cpp
[leetcode]416-Partition Equal Subset Sum链接:https://leetcode.com/problems/partition-equal-subset-sum/description/QuestionGiven a non-empty array containing only positive integers, find if the a...原创 2018-08-12 21:56:13 · 118 阅读 · 0 评论 -
Partition to K Equal Sum Subsets
[leetcode]Partition to K Equal Sum Subsets链接:https://leetcode.com/problems/partition-to-k-equal-sum-subsets/description/QuestionGiven an array of integers nums and a positive integer...原创 2018-08-12 21:56:34 · 158 阅读 · 0 评论 -
Perfect Squares
[leetcode]Perfect Squares链接:https://leetcode.com/problems/ugly-number/description/QuestionGiven a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16,...原创 2018-08-12 21:57:01 · 140 阅读 · 0 评论