ย ย ย ์๋ฃ๊ตฌ์กฐ ๊ตฌํ ์์ค ์ฝ๋๋ค์ด ์๋ ๊ณณ์ ๋๋ค.
- ์๋ฃ๊ตฌ์กฐ ๊ตฌํ์ ํ์ํ ํด๋๋ค์ด ์์ต๋๋ค.
- Java11๋ฅผ ๊ธฐ์ค์ผ๋ก ๊ตฌํ๋ฉ๋๋ค.
- Java11 API : Java API
- Interface : ์๋ฃ๊ตฌ์กฐ๋ฅผ ๊ตฌํํ๋๋ฐ ํ์ํ ๊ธฐ๋ณธ ์ธํฐํ์ด์ค๊ฐ ์์ต๋๋ค.
- _01_ArrayList : ArrayList๋ฅผ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _02_SinglyLinkedList : SinglyLinkedList๋ฅผ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _03_DoublyLinkedList : DoublyLinkedList๋ฅผ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _04_Stack : Stack์ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _05_ArrayQueue : ๋ฐฐ์ด๋ก Queue๋ฅผ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _06_LinkedListQueue : ์ฐ๊ฒฐ๋ฆฌ์คํธ๋ก Queue๋ฅผ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _07_ArrayDeque : ๋ฐฐ์ด๋ก Deque๋ฅผ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _08_LinkedListDeque : ์ฐ๊ฒฐ๋ฆฌ์คํธ๋ก Deque๋ฅผ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _09_Heap : ๋ฐฐ์ด๋ก ํ์ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _10_PriorityQueue : ์ฐ์ ์์ ํ๋ฅผ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค. (๋ฐฐ์ด ํ ๊ธฐ๋ฐ)
- _11_HashSet : Separate Chaining ๋ฐฉ์์ ์ ์ฉํ HashSet์ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _12_LinkedHashSet : Separate Chaining + LinkedList ๋ฐฉ์์ ์ ์ฉํ LinkedHashSet์ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- _13_BinarySearchTree : ๋ฐ๋ณต๋ฌธ์ ์ด์ฉํ BinarySearchTree์ ๊ตฌํํ ์์ค์ฝ๋๊ฐ ์์ต๋๋ค.
- 1. Project import
Window -> File -> New -> Java Project -> uncheck the "Use default location" and browse the DataStructure folder -> Finish
- 2. Build path
Your Project -> Build Path -> Configure Build Path -> Project -> select the class path -> add -> Select DataStructure -> Apply and Close
- 3. import class
import [data structure package name].[data structure name];
Most data structure classes have sorting methods.
Data structure to support sort method:
- ArrayList
- SinglyLInkedList
- DoublyLInkedList
- Stack
- ArrayQueue
- LinkedListQueue
- ArrayDeque
- LinkedListDeque
//ex.
import _01_ArrayList.ArrayList;
class YourClass {
public static void main {
ArrayList<Integer> list = new ArrayList<Integer>();
/*
your code
*/
list.sort();
}
}ย ย ย ๋ธ๋ก๊ทธ์์ ํฌ์คํ ๊ณผ ๋์์ ์ง์์ ์ผ๋ก ์ ๋ฐ์ดํธ ์์
ย ย ย ๋ถ๋ถ์ ์ผ๋ก ์ถ๊ฐ ๊ตฌํ ๋๋ ์ฐจ์ด๊ฐ ์์ ์ ์์ต๋๋ค.