본문 바로가기

Web Development

(89)
[AL&DS] 버블정렬 // 버블정렬 (좌, 우 값을 비교해 쉬프팅 진행) func bubbleSort(_ary []int) []int { for i := 0; i _ary[j+1] { fmt.Println("앞 :", _ary[i], "뒤 :", _ary[j]) _ary[j], _ary[j+1] = _ary[j+1], _ary[j] } } } return _ary }
[AL&DS] 선형검색, 이진검색 1. 선형검색 (좌 -> 우 하나씩 탐색) // 선형검색 : O(N) func linearSearch(_ary []int, _find int) bool { result := false for i := 0; i < len(_ary); i++ { fmt.Println("STEP : ", i+1) if _ary[i] == _find { result = true break } } return result } 2. 이진검색 (MidPoint로 쪼개어 탐색) // 이진검색 : O(logN) func binarySearch(_ary []int, _find int) (bool, int) { lower := 0 upper := len(_ary) - 1 result := false resultIdx := 0 for i :..
[CICD] Github Action (CI) + CodeDeploy (CD) Github Action + Code Deploy + S3 1. Github Secret 설정 (Repository - Setting - Secrets - Actions에서 키 내용 등록) -> AWS IAM의 ACCESSKEY_ID 와 ACCESSKEY_SECRET을 각각 생성해준다. 2. S3 버킷 생성 -> 버킷생성 -> 폴더 생성 (build 파일 저장용) 3. AWS Role 생성 -> AWS S3 Full Access & CodeDeploy Full Access 권한 롤 생성 (github-action-role) -> Code Deploy Role 설정 4. AWS EC2 인스턴스 생성 & Role 설정 -> 인스턴스 생성 (20.04 또는 그 이하 버전으로 할 것) -> 인스턴스에 Role ..
Ubuntu nvm & nodejs 최신 버전 설치 1. NVM을 설치 2. 설치가능 버전확인 후, 3. 원하는 버전을 설정해 설치한다. // NVM 설치 $ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash // NVM 설치확인 $ nvm // 설치가능 버전확인 $ nvm ls-remote // 설치 $ nvm install (version)