300x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 백준
- dp
- 순열
- 코딩
- 그래프
- 코딩 테스트
- 구글 킥스타트
- 프로그래밍
- nlp
- OS
- linux
- 코딩테스트
- 네트워크
- 동적 프로그래밍
- DFS
- 프로그래머스
- CSS
- 브루트포스
- 동적프로그래밍
- 파이썬
- 리눅스
- 알고리즘
- AI
- PYTHON
- google coding competition
- 킥스타트
- 딥러닝
- 운영체제
- kick start
- BFS
Archives
- Today
- Total
오뚝이개발자
[자료구조 및 알고리즘] CH9. Sorting and Searching 본문
728x90
300x250
Sorting
Bubble sort
Selection sort
Insertion sort
Shell sort
Quick sort
Merge sort(분할->병합정렬)
Heap sort
각 sorting 알고리즘의 시간복잡도는?
- Bubble - O(n^2)
- Selection - O(n^2)
- Insertion - O(n^2)
- Shell sort
- Quick sort
- worst : O(n^2)
- best : O(nlogn)
- avg : O(nlogn)
- Merge sort
- Heap sort
Searching
Linear search는 언제 쓰면 좋은가?
- item이 sorted 되어있지 않거나 unsortable할 때
Linear search의 단점?
- 찾는 아이템이 없거나 뒤쪽에 있는 경우 비효율적
Binary search는 언제 쓰면 좋은가?
- item이 sorted 되어있을 때 효율적
Tree와 Graph에서의 searching 방법은?
- Tree
- Inorder
- Preorder
- Postorder
- Graph
- DFS
- BFS
각 searching 알고리즘의 시간복잡도는?
- Linear - O(n)
- Binary - O(logn)
- BST - O(logn)
728x90
300x250
'CS 기초 > 자료구조 및 알고리즘' 카테고리의 다른 글
[자료구조 및 알고리즘] CH11. Greedy algorithm (0) | 2020.10.27 |
---|---|
[자료구조 및 알고리즘] CH10. Divide and Conquer (0) | 2020.10.27 |
[자료구조 및 알고리즘] CH8. Algorithm analysis (0) | 2020.10.26 |
[자료구조 및 알고리즘] CH7. Graph (0) | 2020.10.23 |
[자료구조 및 알고리즘] CH6. Tree (0) | 2020.10.23 |
Comments