原创 LeetCode-Recover Binary Search Tree

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right;

原创 LeetCode-Binary Tree Level Order Traversal II

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right;

原创 LeetCode-Pascal's Triangle II

class Solution { public: vector<int> getRow(int rowIndex) { // Start typing your C/C++ solution below

原创 LeetCode-Unique Binary Search Trees II

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right;

原创 LeetCode-Minimum Depth of Binary Tree

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right;

原创 LeetCode-Triangle

class Solution { public: int minimumTotal(vector<vector<int> > &triangle) { // Start typing your C/C++ solu

原创 LeetCode-Convert Sorted Array to Binary Search Tree

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right;

原创 LeetCode-Path Sum II

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right;

原创 LeetCode-Flatten Binary Tree to Linked List

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right;

原创 LeetCode-Best Time to Buy and Sell Stock II

class Solution { public: int maxProfit(vector<int> &prices) { // Start typing your C/C++ solution below

原创 LeetCode-Balanced Binary Tree

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right;

原创 LeetCode-Scramble String

class Solution { public: bool isScramble(string s1, string s2) { // Start typing your C/C++ solution below

原创 LeetCode-Best Time to Buy and Sell Stock III

class Solution { public: int maxProfit(vector<int> &prices) { // Start typing your C/C++ solution below

原创 LeetCode-Combination Sum

class Solution { public: vector<vector<int> > combinationSum(vector<int> &candidates, int target) { // Star

原创 LeetCode-Palindrome Partitioning

class Solution { public: vector<vector<string>> partition(string s) { // Start typing your C/C++ solution b