Type of Time Complexity (Big O notation)

2022. 1. 19. 17:48·data structure

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
'data structure' 카테고리의 다른 글
  • Sort
  • Search Algorithms (Binary Search/ Linear Search)
  • Array
summercat
summercat
세젤귀 또킨이 집사 블로그
  • summercat
    여름고양이
    summercat
  • 전체
    오늘
    어제
    • 분류 전체보기 (28)
      • Swift-iOS (4)
        • iOS (1)
        • Swift (2)
      • 네트워크 (1)
      • data structure (4)
      • Git (6)
      • Java (13)
        • project lion JSB the origin (10)
        • ByteDegree (3)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    딥링크
    copy on write
    야곰아카데미
    Endpoint
    네트워크
    SWIFT
    유니버셜링크
    universal link
    TCP
    HTTP message
    참조 타입
    deeplink
    ssh-configure
    HTTP Methods
    ssh-agent
    URLQueryItem
    앱개발
    어플
    multipart/form-data
    값 타입
    IOS
    Github
    ssh-add
    부트캠프
    메모리 구조
    Cow
    URLComponents
    JSON
    OSI
    커리어스타터캠프
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.1
summercat
Type of Time Complexity (Big O notation)
상단으로

티스토리툴바