The Problem Setting A palindrome is a string which reads the same in both directions. For example, S = “aba” is a palindrome, S = “abc” is not. Example: 1 2 Input: s = "babad" Output: "bab" or ...
The Problem Setting Brute Force List1: 1 2 3 5 7 12 14 length m List2: 4 9 10 length n 比如说 插入 4 到List1以后, 下一个element 9只会比较 1 2 3 4 5 7 12 14 后面一个 从 5 开始比 所以 所有的list2 都插入 list1以后 所有的list1的eleme...
The Problem Setting Input: nums = [1,2,3,1] Output: 4 Explanation: Rob house 1 (money = 1) and then rob house 3 (money = 3). Total amount you can rob = 1 + 3 = 4. dp For the k-th array, we can o...
Shor-s-algorithm
Longest Palindromic Substring
A new version of content is available.