LeetCode
LeetCode
a-bit
这个作者很懒,什么都没留下…
展开
-
19. 删除链表的倒数第N个节点
https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/ public class Solution { public static void main(String[] args) { Solution solution=new Solution(); ListNode h5=new ListNode(5); ListNode h4=new ListNode(4,h原创 2020-12-03 19:53:42 · 61 阅读 · 0 评论 -
回文串、动态规划、中心扩散、Manacher 算法
https://leetcode-cn.com/problems/longest-palindromic-substring/ 方法一:中心扩散法 class Solution { public String longestPalindrome(String s) { if(s.length()<2) return s; char[] c = s.toCharArray(); int count; int point;原创 2020-11-30 14:02:47 · 101 阅读 · 0 评论