자료구조 & 알고리즘/연결리스트

// 원형 연결 리스트 (Circular Linked List) 구현 class CircularLinkedList { NodeBi head; NodeBi tail; CircularLinkedList(NodeBi node) { this.head = node; this.tail = node; this.head.prev = tail; this.head.next = tail; } // 전체 조회 void showData() { if (this.head == null) { System.out.println("List is Empty !!"); return; } NodeBi cur = this.head; while (true) { System.out.print(cur.data + " "); cur = cur.nex..
꾸준함의 미더덕
'자료구조 & 알고리즘/연결리스트' 카테고리의 글 목록