sort: to arrange something in an order to use fast algorithms ex. binary search, array should be sorted 1. bubble sort - not used very much (there are a lot of better algorithms) - select first 2 items of an array and compare them > if left is bigger than the right, swap them > do the same with index 1, 2 > repeat …. > when it reaches the end of an array, the first cycle of bubble sort ends > do..
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(중첩 반..
Algorithms: Search, Sort, …. Linear Search - check from index 0 - linear time complexity: as input size grows, running time also increase in a linear way Binary Search - only works on sorted array - sorted array: items on an array are sorted. adding items on a sorted array takes more time than one that is not - searching process starts from the middle of the array
배열 생성 시 배열의 길이(size)를 지정해야 함 (JS, Python의 경우 언어에서 이 부분을 핸들링해주기 때문에 길이를 지정하지 않고 생성 가능) Characteristics of array - 0-indexed: array’s elements are indexed from 0 - very fast when reading data, but slow in searching/adding/deleting Types of Operation and how it works - Read: give index number of an element and get it > super fast - Search: find the element the user wants > have to check every eleme..
- Total
- Today
- Yesterday
- URLQueryItem
- HTTP Methods
- OSI
- 부트캠프
- 야곰아카데미
- Cow
- 스택
- TCP
- ssh-agent
- 앱개발
- 어플
- Github
- 값 타입
- multipart/form-data
- IOS
- ssh-add
- HTTP message
- URLComponents
- 메모리 구조
- URL
- copy on write
- 코딩
- SWIFT
- Endpoint
- SSH
- 네트워크
- JSON
- 커리어스타터캠프
- 참조 타입
- ssh-configure
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |