Solution to Best Time to Buy and Sell Stock III by LeetCode

11 Jul

Question: https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/ Question Name: Best Time to Buy and Sell Stock III This problem is a simplified version of the challenge from Codility.

Solution to Binary Tree Maximum Path Sum by LeetCode

10 Jul

Question: https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/ Question Name: Binary Tree Maximum Path Sum

Solution to Best Time to Buy and Sell Stock II by LeetCode

10 Jul

Question: https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ Question Name: Best Time to Buy and Sell Stock II

Solution to Best Time to Buy and Sell Stock by LeetCode

9 Jul

Question: https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/ Question Name: Best Time to Buy and Sell Stock

Solution to Triangle by LeetCode

9 Jul

Question: https://oj.leetcode.com/problems/triangle/ Question Name: Triangle

Solution to Populating Next Right Pointers in Each Node by LeetCode

9 Jul

Question: https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/ Question Name: Populating Next Right Pointers in Each Node

Solution to Pascal's Triangle II by LeetCode

7 Jul

Question: https://oj.leetcode.com/problems/pascals-triangle-ii/ Question Name: Pascal’s Triangle II

Solution to Pascal's Triangle by LeetCode

7 Jul

Question: https://oj.leetcode.com/problems/pascals-triangle/ Question Name: Pascal’s Triangle

Solution to Distinct Subsequences by LeetCode

7 Jul

Question: https://oj.leetcode.com/problems/distinct-subsequences/ Question Name: Distinct Subsequences This is a dynamic programming challenge. Firstly I solved it with recursion. But that solution did not satisfy the time requirement. These two posts give more details about the right solution: LeetCode: Distinct Subsequences(不同子序列的个数)(in … Read More »