摘要:
判断单链表是否有环,如果有环的话,具体再有环的节点是哪个? static class Node { private Node next; private int val; public Node(Node next, int val) { this.next = next; this.val = v 阅读全文
posted @ 2020-07-14 00:22
使用D
阅读(265)
评论(0)
推荐(0)
摘要:
通过快慢指针方式对数组进行去重 public static void main(String[] args) { int[] a = {1, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 9, 10, 11}; int startI = 0; int 阅读全文
posted @ 2020-07-14 00:03
使用D
阅读(426)
评论(0)
推荐(0)