一、原题 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [3,4], [6

LeetCode  

一、原题 Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example: Given the below binary tree, 1 / \ 2 3 Return6. 二、中文 找到二叉树中任意

LeetCode   二叉树   路径和  

一、原题 Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan, a canal: Panama"is a palindrome. "race a car"is not a pa

LeetCode   回文字符串  

一、原题 Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter can be changed at a time Each intermediate wor

LeetCode   字符串   过渡  

一、原题 Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given[100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is[1, 2, 3,

LeetCode  

一、原题 Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number. An example is the root-to-leaf path1->2->3which represents the number123. Find the total sum of

LeetCode   二叉树  

一、原题 Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s ="aab", Return [ ["aa","b"],

LeetCode   回文  

一、原题 Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors. OJ's undirected graph serialization: Nodes are labeled uniquely. We use#as a separator for each node,

LeetCode   java   DFS   BFS  

一、原题 There are N gas stations along a circular route, where the amount of gas at station i isgas[i]. You have a car with an unlimited gas tank and it costscost[i]of gas to travel from station i to its

java   LeetCode  

一、原题 There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at least one

LeetCode   java   小朋友分糖  
1 2 3 4 5 6