yokots

Results 2 comments of yokots

动态规划法 ```typescript function longestPalindrome(s: string): string { // 字符串长度小于 2 返回 if (s.length < 2) { return s; } // dp[i][j] 即字符串 s 下标从 i 到 j 是否为回文字符串。 const dp:...

```js const arr = [2, 1, 2, 4, 3]; const result = arr.map((m, index) => { const t = arr.slice(index).find(n => n > m); return t === undefined ? -1...