/** * struct ListNode { * int val; * struct ListNode *next; * }; */ class Solution { public: /** * * @param head ListNode类 the head * @return bool布尔型 */ bool isPail(ListNode* head) { // write code here //要用一个新的链表去存储head的节点值,否则反转之后head会变 int len = getLength(head); ListNode* newHead = new ListNode(0);...