728x90 이중연결리스트1 Doubly Linked List 이중 연결 리스트 * 이중 연결 리스트는 순차적으로 연결된 노드 집합으로 구성된 데이터 구조 * 각 노드가 이전 노드와 다음 노드를 가리킨다. * 노드는 이전 노드와 다음 노드를 가리키는 두 개의 포인터로 '이중 링크'되어 있다. public class DoublyLinkedList { Node head; // 첫번째 노드 Node tail; // 마지막 노드 int size; // 이중 연결 리스트 요소 수 //constructor public DoublyLinkedList(){ head = null; tail = null; size = 0; } //node class private static class Node { int data; Node prev; Node next; //constructor public Node.. 2023. 10. 24. 이전 1 다음 728x90