原创 124 Binary Tree Maximum Path Sum [Leetcode]

題目內容: Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes

原创 023 Merge k Sorted Lists [Leetcode]

題目內容: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 題目分析: k

原创 122 Best Time to Buy and Sell Stock II [Leetcode]

題目內容: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm

原创 142 Linked List Cycle II [Leetcode]

題目內容: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not

原创 131 Palindrome Partitioning [Leetcode]

題目內容: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possibl

原创 019 Remove Nth Node From End of List [Leetcode]

題目內容: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked

原创 021 Merge Two Sorted Lists [Leetcode]

題目內容: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together

原创 216 Combination Sum III [Leetcode]

題目內容: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 c

原创 134 Gas Station [Leetcode]

題目內容: There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a

原创 127 Word Ladder [Leetcode]

題目內容: Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transform

原创 140 Word Break II [Leetcode]

題目內容: Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is

原创 212 Word Search II [Leetcode]

題目內容: Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be con

原创 132 Palindrome Partitioning II [Leetcode]

題目內容: Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum

原创 133 Clone Graph [Leetcode]

題目內容: Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ’s undirec

原创 188 Best Time to Buy and Sell Stock IV [Leetcode]

題目內容: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm