📒 Tech Note

    [LeetCode] 238. Product of Array Except Self

    [LeetCode] 238. Product of Array Except Self

    *알고리즘 스터디에 참여하면서 Blind 75 LeetCode Questions 목록에 있는 문제를 풀이합니다. 문제: https://leetcode.com/problems/product-of-array-except-self/ Product of Array Except Self - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 배열에서 현재 요소를 뺀 나머지 요소들을 곱한 값을 그 자리에 넣어서 Return 해야한다. 1. 입력한 리스트와 같은 크기의 리스트를 ..

    [LeetCode] 217. Contains Duplicate

    [LeetCode] 217. Contains Duplicate

    *알고리즘 스터디에 참여하면서 Blind 75 LeetCode Questions 목록에 있는 문제를 풀이합니다. 문제: https://leetcode.com/problems/contains-duplicate/ Contains Duplicate - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 풀이: class Solution: def containsDuplicate(self, nums: List[int]) -> bool: # Sol 1 -- O(n) # dist..

    [LeetCode] 121. Best Time to Buy and Sell Stock

    [LeetCode] 121. Best Time to Buy and Sell Stock

    *알고리즘 스터디에 참여하면서 Blind 75 LeetCode Questions 목록에 있는 문제를 풀이합니다. 문제: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ Best Time to Buy and Sell Stock - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 풀이: class Solution: def maxProfit(self, prices: List[int]) -> int: if ..

    [LeetCode] 1. Two Sum

    [LeetCode] 1. Two Sum

    *알고리즘 스터디에 참여하면서 Blind 75 LeetCode Questions 목록에 있는 문제를 풀이합니다. 문제: https://leetcode.com/problems/two-sum/ Two Sum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 풀이: class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: nums_dic = {} # Stores the dictionary..

    [선형 자료구조] 1. Array

    [선형 자료구조] 1. Array

    데이터 요소가 순차적으로 배열되는 자료구조를 선형(Linear) 자료구조라고 한다. 선형 자료구조는 단일 레벨로 구성된다. 배열, 스택, 큐, 연결 리스트 등이 모두 선형 자료구조에 속한다. 배열 C 언어를 기준으로 배열을 설명해보면, 배열은 크기를 지정하고 해당 크기만큼의 연속된 메모리 공간을 할당받는 작업을 수행하는 자료형을 말한다. 크기가 고정되어 있기 때문에 한번 생성하면 크기를 변경하는것이 불가능하다. 예를 들어 정수형 요소 3개로 이뤄진 배열을 생성하면 다음 그림처럼 물리 메모리에 배열 요소 값들이 순서대로 배치된다. int arr[3] = { 3, 6, 9 }; 최신 시스템(32비트 이상)과 컴파일러 기준으로 int를 4바이트로 사용한다. 따라서 가리키는 주소는 1바이트마다 1씩 증가한다. ..

    [JS] 변수와 함수 정의

    [JS] 변수와 함수 정의

    변수 변수는 상황에 따라 변할 수 있는 값 let myname; // 선언 myname = 'Hazel'; // 할당 표현식에 변수를 사용할 수 있으며, 결과물을 다시 변수로 담을 수 있다. 타입 숫자, 문자열, Boolean, 배열, 객체, 함수, undefined 특정값의 타입을 확인할 때 typeof 값; 실습 예시 let string = '1'; console.log(typeof string) // --- string let number = 1; console.log(typeof number) // --- number 함수 함수 선언식 function getSquareArea(base, height) { let SquareArea = base * height; return SquareArea } ..

    [Linux] Ubuntu vim 설치 및 설정

    Ubuntu 18.04 LTS vim 설치하기 전 apt-get 업데이트 sudo apt-get update업데이트 마치고 vim 설치 sudo apt-get install vim기능 추가를 위해 설정 파일 열기 vi ~/.vimrc편집기 입력을 위해 i 를 눌러주고 필요한 내용 추가 set number " line 표시 set ai " auto indent set si " smart indent set cindent " c style indent set shiftwidth=4 " 자동 공백 채움 시 4칸 set tabstop=4 " tab을 4칸 공백으로 set ignorecase " 검색 시 대소문자 무시 set hlsearch " 검색 시 하이라이트 set nocompatible " 방향키로 이동 ..

    Kubernetes(IKS)에서 Jira 활용한 CI/CD 파이프라인 구축하기(4/4)

    Kubernetes(IKS)에서 Jira 활용한 CI/CD 파이프라인 구축하기(4/4)

    Kubernetes(IKS)에서 Jira 활용한 CI/CD 파이프라인 구축하기(4/4) Part 4. Jira에서 Gitlab, Jenkins CI/CD 운영하기 Jira Issue에 소스 커밋, 빌드 정보를 업데이트 하고, 워크플로우에서 Jenkins 자동빌드를 실행할 수 있도록 설정합니다. 사전 준비 사항 Gitlab(VM) 설치 Jenkins(IKS) 설치 Jira 프로젝트 생성 및 이슈 등록 Features Jira Issue에 Gitlab Commit 정보 업데이트하기 Jira Issue에 Jenkins 빌드 결과 업데이트하기 Jira Workflow에서 Jenkins 자동빌드 실행하기 Steps Jira와 Gitlab 연동하기 Jira에서 Jenkins 빌드 확인하기 Jira Workflow에..

    Kubernetes(IKS)에서 Jira 활용한 CI/CD 파이프라인 구축하기(3/4)

    Kubernetes(IKS)에서 Jira 활용한 CI/CD 파이프라인 구축하기(3/4)

    Kubernetes(IKS)에서 Jira 활용한 CI/CD 파이프라인 구축하기(3/4) Part 3. Gitlab, Jenkins Webhook 연동하기 Gitlab Repository에 이벤트 발생 시 Jenkins 자동 빌드 연동하기 사전 준비 사항 Gitlab(VM) 설치 Jenkins(IKS) 설치 연동 환경 Jenkins ver. 2.222.4 Gitlab ver. 13.0.5 Steps Jenkins Plugin 설치 Gitlab에서 Access Token 발급 Jenkins에 발급받은 Access Token을 Credential로 등록 Jenkins gloabl settings 에서 gitlab 설정 추가 Jenkins User 생성 Jenkins Project 생성 및 Build Trigg..

    Kubernetes(IKS)에서 Jira 활용한 CI/CD 파이프라인 구축하기(2/4)

    Kubernetes(IKS)에서 Jira 활용한 CI/CD 파이프라인 구축하기(2/4)

    Part 2. Jira 초기 설정하기 Jira 인스턴스 설치를 마치고, 초기 설정을 진행합니다. 먼저 설정 첫 화면에서 I'll set it up myself를 선택해 진행하겠습니다. 앞서 설치한 mysql을 활용하기 위해 dbconfig 정보를 수정합니다. jira pod에 shell 접속을 시도한다. kubectl exec -it {jira pod 이름} bash vim 편집기 이용을 위해 설치한다. apt-get update apt-get install -y vim dbconfig.xml 파일에 db 설정값을 집어넣습니다. vi dbconfig.xml jdbc:mysql://169.56.75.38:3306/jiradb?useUnicode=true&characterEncoding=UTF8&sessio..