Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on …
LeetCode | Best Time to Buy and Sell Stock(股票购买和抛售问题)
Say you have an array for which the ith element is the price of a given stock on day i. If you …
LeetCode | Best Time to Buy and Sell Stock II(股票购买抛售问题II)
Say you have an array for which the ith element is the price of a given stock on day i. Design …
LeetCode | Binary Tree Maximum Path Sum(二叉树的路径最大值)
Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For exampl…
LeetCode | Valid Palindrome(有效的回文串)
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. …
LeetCode | Longest Consecutive Sequence(最长连续序列)
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example…
LeetCode | Sum Root to Leaf Numbers(所有根结点到叶节点路径和的和)
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number…
LeetCode | Palindrome Partitioning(将一个子串划分成回文子串)
Given a string s, partition s such that every substring of the partition is a palindrome. Retur…
LeetCode | Palindrome Partitioning II(最少切割次数将一个子串划分成回文子串)
Given a string s, partition s such that every substring of the partition is a palindrome. Retur…
LeetCode | Gas Station(加油站)
There are N gas stations along a circular route, where the amount of gas at station i is&n…
LeetCode | Candy(分糖果问题)
There are N children standing in a line. Each child is assigned a rating value. You are giving candi…
LeetCode | Single Number(数组中的单个数字)
Given an array of integers, every element appears twice except for one. Find that single one. Note: …