์ ๊ทผ | ํ์ | ์ฝ์ | ์ญ์ | |
๋ฐฐ์ด (array) | O(1) ~ O(1) | O(n) ~ O(n) | O(n) ~ O(n) | O(n) ~ O(n) |
์คํ (stack) | O(n) ~ O(n) | O(n) ~ O(n) | O(1) ~ O(1) | O(1) ~ O(1) |
ํ (queue) | O(n) ~ O(n) | O(n) ~ O(n) | O(1) ~ O(1) | O(1) ~ O(1) |
์ด์ค ์ฐ๊ฒฐ ๋ฆฌ์คํธ (doubly linked list) | O(n) ~ O(n) | O(n) ~ O(n) | O(1) ~ O(1) | O(1) ~ O(1) |
ํด์ ํ ์ด๋ธ (hash tablee) | O(1) ~ O(n) | O(1) ~ O(n) | O(1) ~ O(n) | O(1) ~ O(n) |
์ด์ง ํ์ ํธ๋ฆฌ (BST) | O(logn) ~ O(n) | O(logn) ~ O(n) | O(logn) ~ O(n) | O(logn) ~ O(n) |
AVL ํธ๋ฆฌ | O(logn) ~ O(logn) | O(logn) ~ O(logn) | O(logn) ~ O(logn) | O(logn) ~ O(logn) |
๋ ๋ ๋ธ๋ ํธ๋ฆฌ | O(logn) ~ O(logn) | O(logn) ~ O(logn) | O(logn) ~ O(logn) | O(logn) ~ O(logn) |
* AVL ํธ๋ฆฌ : ์๊ฐ ๊ท ํ ์ด์ง ํ์ ํธ๋ฆฌ๋ก ๋ ์์ ์๋ธํธ๋ฆฌ์ ๋์ด๋ ํญ์ ์ต๋ 1๋งํผ ์ฐจ์ด ๋๋ค๋ ํน์ง์ด ์์
* ์ด์ง ํ์ ํธ๋ฆฌ ๋ ธ๋์ ์ค๋ฅธ์ชฝ ํ์ ํธ๋ฆฌ์๋ '๋ ธ๋ ๊ฐ๋ณด๋ค ํฐ ๊ฐ'์ด ์๋ ๋ ธ๋๋ง ํฌํจ๋๊ณ , ์ผ์ชฝ ํ์ ํธ๋ฆฌ์๋ '๋ ธ๋ ๊ฐ๋ณด๋ค ์์ ๊ฐ'์ด ๋ค์ด์๋ ํธ๋ฆฌ
๋ฐ์ํ
'๐ค ์๊ณ ๋ฆฌ์ฆ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
baekjoon. 1071 ์ํธ [Platinum V][python] (0) | 2023.06.22 |
---|---|
baekjoon. 1083 ์ํธ [Gold V][python] (0) | 2023.06.15 |
baekjoon. ํ์์ค ๋ฐฐ์ [Silver I] [python] (1) | 2023.06.08 |
์๊ณ ๋ฆฌ์ฆ ๊ฟํ. ํ์ด์ฌ (0) | 2023.06.01 |
baekjoon. ์์ด๋ฒ๋ฆฐ ๊ดํธ [Silver II] [python] (0) | 2023.05.22 |