컴퓨터사이언스에서는 문제를 해결하는 여러가지 알고리즘이 있는데, 어떤 것이 가장 최적인지 비교하기 위한 방법이 필요하다. 일반적으로 입력이 n일 때, 결과를 얻을 때까지의 연산시간이다.
컴퓨터과학에서 알고리즘의 시간복잡도는 입력을 나타내는 문자열 길이의 함수로서 작동하는 알고리즘을 취해 시간을 정량화하는 것이다. 알고리즘의 시간복잡도는 주로 빅-오 표기법(Big-O notation)을 사용하여 나타내며, Pan Bubilek의 빅-오 표기법은 계수와 낮은 차수의 항을 제외시키는 방법이다.
by wikipedia
| Notation | Name |
|---|---|
| constant | |
| double logarithmic | |
| logarithmic | |
| , c>1 | polylogarithmic |
| , 0<c<1 | fractional power |
| linear | |
| nlog-starn | |
| linearithmic, lolinear, quasilinear, nlogn | |
| quadratic | |
| polynomial or algeraic | |
| exponential | |
| factorial |
알고리즘 복잡도는 아래 그림과 같이 성능이 더 좋고, 나쁘게 비교될 수 있다.

| Input Length | Worst Accepted Time Complexity | Usually type of solutions |
|---|---|---|
| 10 -12 | Recursion and backtracking | |
| 15-18 | Recursion, backtracking, and bit manipulation | |
| 18-22 | Recursion, backtracking, and bit manipulation | |
| 30-40 | Meet in the middle, Divide and Conquer | |
| 100 | Dynamic programming, Constructive | |
| 400 | Dynamic programming, Constructive | |
| 2K | Dynamic programming, Binary Search, Sorting, Divide and Conquer | |
| 10K | Dynamic programming, Graph, Trees, Constructive | |
| 1M | Sorting, Binary Search, Divide and Conquer | |
| 100M | Constructive, Mathematical, Greedy Algorithms |
시간 복잡도는 다양한 표기법이 있는데, Big-O(), Big-Omega(), Big-Theta()가 있다.
<=upper boundthe most amount of time requiredthe worst case performancasymptotic upper boundMathematically – Big Oh is : 
>=lower boundthe least amount of time requiredthe most efficient way possible, i.e. best caseasymptotic lower boundMathematically – Big Omega is : 
==tightest boundthe best of all the worst case timesMathematically – Big Theta is :
※자료: geeksforgeeks.org
[1] https://www.geeksforgeeks.org/time-complexity-and-space-complexity/
[2] https://www.geeksforgeeks.org/understanding-time-complexity-simple-examples/
[3] https://ko.wikipedia.org/wiki/%EC%8B%9C%EA%B0%84_%EB%B3%B5%EC%9E%A1%EB%8F%84
[4] https://en.wikipedia.org/wiki/Big_O_notation
[5] https://www.geeksforgeeks.org/difference-between-big-oh-big-omega-and-big-theta/
[6] https://medium.com/thedevproject/logarithm-complexity-vs-linear-complexity-f9871333756b
[Algorithm] Space Complexity (공간 복잡도 )