原创 【LeetCode 994】 Rotting Oranges

題目描述 In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 r

原创 【LeetCode 1371】 Find the Longest Substring Containing Vowels in Even Counts

題目描述 Given the string s, return the size of the longest substring containing each vowel an even number of times. Th

原创 【LeetCode 95】 Unique Binary Search Trees II

題目描述 Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n. Exam

原创 【LeetCode 542】 01 Matrix

題目描述 Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two

原创 【LeetCode 1248】 Count Number of Nice Subarrays

題目描述 Given an array of integers nums and an integer k. A subarray is called nice if there are k odd numbers on it.

原创 【LeetCode 784】 Letter Case Permutation

題目描述 Given a string S, we can transform every letter individually to be lowercase or uppercase to create another st

原创 【LeetCode 918】 Maximum Sum Circular Subarray

題目描述 Given a circular array C of integers represented by A, find the maximum possible sum of a non-empty subarray o

原创 【LeetCode 560】 Subarray Sum Equals K

題目描述 Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose s

原创 【LeetCode 530】 Minimum Absolute Difference in BST

題目描述 Given a binary search tree with non-negative values, find the minimum absolute difference between values of an

原创 【LeetCode 887】 Super Egg Drop

題目描述 You are given K eggs, and you have access to a building with N floors from 1 to N. Each egg is identical in fu

原创 【LeetCode 75】 Sort Colors

題目描述 Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color

原创 【LeetCode 300】 Longest Increasing Subsequence Medium

題目描述 Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,

原创 【LeetCode 76】 Minimum Window Substring

題目描述 Given a string S and a string T, find the minimum window in S which will contain all the characters in T in co

原创 【LeetCode 128】 Longest Consecutive Sequence

題目描述 Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algori

原创 【LeetCode 152】 Maximum Product Subarray

題目描述 Given an integer array nums, find the contiguous subarray within an array (containing at least one number) whi