블로그 카테고리 용도:
🔎 매주 KT 에이블 스쿨에서 배운 내용을 복습하기 위해
[VCS, Git, Github]
1. 형상관리 시스템(VCS)
프로그램을 만들다보면,
잘못 만들어서 다시 소스코드를 이전 상태로 되돌릴 필요도 있고,
변경된 이력을 확인할 필요도 있다.
개발 하면서 발생하는 충돌에 대한 처리도 필요하기에 형상관리 시스템이 생김
2. Git
- 분산 소스 버전 관리 시스템 (Local)
- 서버를 분산시켜 구축할 수 있게 하는 소프트웨어
- 소스코드를 효율적으로 관리할 수 있게 해주는 형상관리도구
3. Github
- Git을 사용하는 프로젝트를 지원하는 웹 호스팅 서비스(Cloud)
- Git을 업로드 할 수 있는 웹사이트
- 협업 공간
[Git Head, Branch 관계]
- Head,Branch
- Head 와 Branch는 포인터이다.
- Head는 항상 현재 Branch의 최신 커밋을 포인팅한다.
- 엄밀히 말하면 Head는 Branch를 통해 간접적으로 Commit을 가리키고 있다.
[Head와 Branch의 동작]
커밋을 하면 Head가 가리키는 Branch가 최신 커밋으로 이동하게 됩니다.
여기서 Another Branch를 만들면 Head를 가리키던 커밋을 Another Branch가
가리키게 됩니다. (Head와 Another Branch는 동일한 커밋을 가리키고 있습니다.)
여기서 checkout Another를 하면 Head는 Another Branch를 가르키게 됩니다.(*)
이상태에서 커밋을 두번 하게 되면 기존 Branch는 자리를 유지하고 Head가 가르키고 있는
새로운 Another Branch가 뻗어나가게 됩니다.
이제 다시 checkout main을 하면 Head가 main을 가르키게 됩니다.
여기서 커밋을 진행하게 되면 코드의 흐름이 두 갈래로 나뉘게 되고 이를 '분기한다'라고 말합니다.
마지막으로 git merge Another을 하면
Head가 가르키던 커밋에 Another 브랜치가 가리키던 커밋을 합쳐 새로운 커밋이 만들어 지게 됩니다
이를 '병합'이라고 말합니다.
[Algorithm]
1.보초법 (선형 검색 방법중 하나)
- 시간복잡도O(n) -> 빅오표기법
- 보초 값까지 검색할시 실패 (반복의 종료를 알림,검색 실패 조건 제거)
2. 이분 탐색(Binary Search)
- 정렬되어 있는 리스트에서 탐색 범위를 절반씩 좁혀가며 key를 찾는 방식
- 배열 데이터가 정렬되있을 때만 사용 가능한 알고리즘
- 시간 복잡도 O(lonN) -> 빅오표기법
🔎 이분 탐색 알고리즘 슈도 코드
# Sudo
arr => 찾고자 하는 값이 담긴 리스트
key => 찾고자 하는 값
arr.sort() => 정렬 되있어야 이분 탐색 가능
pl = 0
pr = len(arr)-1
while pl<=pr:
pc = (pl+pr)//2
if arr[pc] == key:
print(arr[pc])
break
elif arr[pc] < key:
pl = pc + 1
else:
pr = pc - 1
'KT-AIVLE' 카테고리의 다른 글
[KT-AIVLE 5주차 AI Track] 딥러닝 (0) | 2023.03.17 |
---|---|
[KT-AIVLE 4주차 AI Track] 머신러닝 (0) | 2023.03.17 |
[KT-AIVLE 3주차 AI Track] 미프,코마,웹크롤링 (0) | 2023.03.17 |
[KT-AIVLE 2주차 AI Track] Pandas Library (0) | 2023.03.17 |
[KT-AIVLE 2주차 AI Track] Numpy Library (0) | 2023.03.17 |