import java.util.Stack; public class Solution { public ListNode ReverseList(ListNode head) { Stack<ListNode> stack= new Stack<>(); //把鏈表節(jié)點(diǎn)全部摘掉放到棧中 while (head != null) { stack.push(head); head = head.next; } if (stack.isEmpty()) return null; ...