Zzong's Notes

Home

❯

algorithms

❯

time complexity

time complexity


링크된 언급

1
Insertion Sort

Efficient for data sets that are already substantially sorted: time complexity is O(kn) when each element in the input is no more than k places away from its sorted position Best t...

함께 보면 좋은 글

Insertion Sort

Insertion Sort 삽입 정렬은 자료 배열의 모든 요소를 앞에서부터 차례대로 이미 정렬된 배열 부분과 비교하여, 자신의 위치를 찾아 삽입함으로써 정렬을 완성하는 알고리즘이다.

Merge Sort

분할 단계와 병합 단계로 나뉘는 divide and conquer 알고리즘 시간 복잡도: O(nlog(n)) 공간 복잡도: O(n) (병합 단계에서 사용) 코드 def mergeSort(arr, l, r): if l < r: Same as (l+r)//2, but avoids overflow for...

string

두 String 이 주어질 경우 문제 1.1.

dynamic programming

amortized analysis

Amortized Analysis amortized analysis 는 주어진 알고리즘을 실행할 때 얼마나 많은 자원 (특히 시간 또는 메모리) 가 필요한지를 분석하는 방법이다.

sorting

Sorting Insertion Sort Selection Sort Merge Sort Bubble Sort quick Sort Heap Sort Related References.

greedy algorithm

Greedy Algorithm B) Related C) References.

DFS

DFS Related References.

quick Sort

Quick Sort 합병 정렬 (merge sort) 과 달리 퀵 정렬은 리스트를 비균등하게 분할한다. 분할 정복 (divide and conquer) 방법 문제를 작은 2 개의 문제로 분리하고 각각을 해결한 다음, 결과를 모아서 원래의 문제를 해결하는 전략이다.

NP-complete

NP-complete P 는 다항 시간 (polynomial time) 에 결정론적 (deterministically) 으로 해결 가능한 (solvable) 문제들의 집합, 주어지는 입력 (input) 이 참인지 거짓인지를 다항 시간에 결정론적으로 해결하는 알고리즘이 존재하면 X∈P 입니다.