解题思路 找到后半部分链表,再反转.然后与前半部分链表比较 代码 /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListNode next; * public ListNode(int x) { val = x; } * } */ public class Solution { public bool IsPalindrome(ListNode head)…
回文 palindrome Python 字符串反转string[::-1] Slice notation "[a : b : c]" means "count in increments of c starting at a inclusive, up to b exclusive". If c is negative you count backwards, if omitted it is 1. If a is omitted then you start a…