题目描述输入一个链表,输出该链表中倒数第k个结点。1、借助于栈/*public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; }}*/i......
判断一个链表是否是回文的。/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) ...