摘要: 双链表的代码实现 import java.util.NoSuchElementException; public class MyLinkedList<E> { // 虚拟头尾节点 final private Node<E> head, tail; private int size; // 双链表节 阅读全文
posted @ 2025-02-13 23:28 技术蓝鱼 阅读(19) 评论(0) 推荐(0)
摘要: 一 单链表 链表的基本操作 class ListNode { int val; ListNode next; ListNode(int x) { val = x; } } // 输入一个数组,转换为一条单链表 ListNode createLinkedList(int[] arr) { if (ar 阅读全文
posted @ 2025-02-13 23:25 技术蓝鱼 阅读(24) 评论(0) 推荐(0)