티스토리 뷰
1. Constant time complexity
constant time algorithm: regardless of input size, number of steps are determined.
time complexity = O(1), O(2), …
2. Linear time complexity
linear search algorithm has a time complexity of O(N)
time complexity = O(N)
N: number of inputs
linear search algorithm: time complexity = O(N)
3. Quadratic time complexity (2차 시간)
- happens when a function has nested loops(중첩 반복. ex. 중첩된 for문 등)
- time complexity = O(N^2)
4. Logarithmic Time Complexity (로그 시간)
- used to express speed of binary search
- time complexity = O(log N)
- logarithm(로그) <-> exponent(지수)
- 로그의 밑은 기재하지 않음
-
'data structure' 카테고리의 다른 글
Sort (0) | 2022.01.19 |
---|---|
Search Algorithms (Binary Search/ Linear Search) (0) | 2022.01.19 |
Array (0) | 2022.01.19 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 야곰아카데미
- SWIFT
- URLQueryItem
- Cow
- HTTP Methods
- copy on write
- ssh-configure
- HTTP message
- JSON
- ssh-agent
- SSH
- 네트워크
- 어플
- multipart/form-data
- Endpoint
- 참조 타입
- URLComponents
- 값 타입
- 부트캠프
- ssh-add
- Github
- TCP
- IOS
- 스택
- 코딩
- 메모리 구조
- 앱개발
- URL
- 커리어스타터캠프
- OSI
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
글 보관함