algorithm-hot100
没有特殊说明,题目均来自牛客面试必刷101
链表
反转链表
1234567891011121314151617181920212223242526272829class Node { int val; Node nxt; public Node(int val) { this.val = val; }}public class Solution { public static void main(String[] args) { Node dummy = new Node(-1), pre = dummy; for (int i = 0; i < 10; i++) { Node cur = new Node(i); pre.nxt = cur; pre = cur; } pre = null; Node cur = dummy.nxt; while (cur != null) { Node nxt ...