Leetcode
Introduction
1.
First Chapter
1.1.
LC340 Longest Substring with At Most K Distinct Characters
1.2.
LC323 Number of Connected Components in an Undirected Graph
1.3.
LC255 Verify Preorder Sequence in Binary Search Tree
1.4.
LC254 Factor Combinations
1.5.
LC3 Longest Substring Without Repeating Characters
1.6.
LC265 Paint House II
1.7.
LC250 Count Univalue Subtrees
1.8.
LC329 Longest Increasing Path in a Matrix
1.9.
LC298 Binary Tree Longest Consecutive Sequence
1.10.
LC163 Missing Ranges
1.11.
LC325 Maximum Size Subarray Sum Equals k
1.12.
LC121 Best Time to Buy and Sell Stock
1.13.
LC101 Symmetric Tree
1.14.
LC118 Pascal's Triangle
1.15.
LintCode Permutation Index
1.16.
LintCode Permutation Index II
1.17.
Leetcode Wood Cut
1.18.
LintCode Delete Digits
1.19.
LeetCode35 Search Insert Position
1.20.
LC129 Sum Root to Leaf Numbers
Powered by
GitBook
Leetcode
LintCode Permutation Index II
这里需要考虑重复元素,有无重复元素最大的区别在于原来的1!, 2!, 3!...等需要除以重复元素个数的阶乘。记录重复元素个数同样需要动态更新,引入哈希表这个万能的工具较为方便。