전체 글 32

쿠버네티스 실습해보기 - POD

[[#1.쿠버네티스 설치|1.쿠버네티스 설치]][[#1.쿠버네티스 설치#1.1. 쿠버네티스 종류|1.1. 쿠버네티스 종류]][[#1.쿠버네티스 설치#1.2. 도커 데스크탑 쿠버네티스 사용하기|1.2. 도커 데스크탑 쿠버네티스 사용하기]][[#2. Nginx Pod 실습|2. Nginx Pod 실습]][[#2. Nginx Pod 실습#2.1. 매니페스트 파일|2.1. 매니페스트 파일]][[#2.1. 매니페스트 파일#2.1.1. apiVersion|2.1.1. apiVersion]][[#2.1. 매니페스트 파일#2.1.2. kind|2.1.2. kind]][[#2.1. 매니페스트 파일#2.1.3. metadata|2.1.3. metadata]][[#2.1. 매니페스트 파일#2.1.4. spec|2.1.4..

학습 2024.12.09

쿠버네티스, 맛보기

[[#1. 쿠버네티스란|1. 쿠버네티스란]][[#1. 쿠버네티스란#1.1. 쿠버네티스 이전 컨테이너 관리|1.1. 쿠버네티스 이전 컨테이너 관리]][[#1.1. 쿠버네티스 이전 컨테이너 관리#1.1.2. 전통적인 배포 시대|1.1.2. 전통적인 배포 시대]][[#1.1. 쿠버네티스 이전 컨테이너 관리#1.1.3. 가상화된 배포 시대|1.1.3. 가상화된 배포 시대]][[#1.1. 쿠버네티스 이전 컨테이너 관리#1.1.3. 컨테이너 개발 시대|1.1.3. 컨테이너 개발 시대]][[#1. 쿠버네티스란#1.2. 쿠버네티스|1.2. 쿠버네티스]][[#2. 쿠버네티스의 기본 구성|2. 쿠버네티스의 기본 구성]][[#2. 쿠버네티스의 기본 구성#2.1. 노드|2.1. 노드]][[#2.1. 노드#2.1.1. 마스터 ..

학습 2024.12.02

2024 11 09 3133. Minimum Array End

문제You are given two integers n and x. You have to construct an array of positive integers nums of size n where for every 0 요약배열 nums[n-1]을 만들되 모든 수가 AND연산을 하여 x를 만들어야하고 증가 수열이어야한다.풀이일단 전탐은 절대 불가....long범위임;;;그래서 일단 AND의 특성을 활용둘다 1이어야 1이나오는 AND연산이므로x의 이진수 자리에서 0에 해당하는 자리에 n -1 의 이진수를 체워넣으면 된다 (첫번째는 x와 같으므로)풀이 1처음 사용한 방법은 Stack을 사용하였다.n과 x를 2로 나누면서 큰수부터 stack넣었고 차례대로 빼면서 넣었다.class Solution { pu..

알고리즘 2024.11.09

2024 11 06 3011. Find if Array Can Be Sorted

문제You are given a 0-indexed array of positive integers nums.In one operation, you can swap any two adjacent elements if they have the same number of set bits. You are allowed to do this operation any number of times (including zero).Return true if you can sort the array, else return false.요약10진수의 정수 배열에 대해서 인접한 두 수가 2진법으로 표현시 1의 개수가 같으면 둘의 자리를 교환할 수 있다.이때 이 배열을 정렬할 수 있는가?풀이새로운 배열에 인접하면서 2진법 표현시 ..

알고리즘 2024.11.06

2024 11 05 2914. Minimum Number of Changes to Make Binary String Beautiful

문제You are given a 0-indexed binary string s having an even length.A string is beautiful if it's possible to partition it into one or more substrings such that:Each substring has an even length.Each substring contains only 1's or only 0's.You can change any character in s to 0 or 1.Return the minimum number of changes required to make the string s beautiful.요약0과 1로 이루어진 짝수 문자열에서 짝수길이의 동일한 문자만 가진 ..

알고리즘 2024.11.05

2024 11 04 3163. String Compression III

문제Given a string word, compress it using the following algorithm:Begin with an empty string comp. While word is not empty, use the following operation:Remove a maximum length prefix of word made of a single character c repeating at most 9 times.Append the length of the prefix followed by c to comp.Return the string comp.요약연속된 문자가 몇개있는지 세되 9개 씩만풀이어렵진않다 우선 첫글자를 저장해두고 다음 문자가 같은지 비교후 다르거나 9를 넘는다면 sb..

알고리즘 2024.11.04

2024 11 03 Result796. Rotate String

문제Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s.A shift on s consists of moving the leftmost character of s to the rightmost position.For example, if s = "abcde", then it will be "bcdea" after one shift.요약첫글자를 마지막으로 돌리면서 goal과 같은게 나오는지 검사풀이처음에는 String.substring으로 풀긴했는데 효율이 너무 안좋게 나오길레그냥 s 문자 안바꾸고 idx로 검하였다.코드class Solution { public..

알고리즘 2024.11.03

Spring 의존성 끊어내기 DIP, Event, AOp

1. 서론여러 프로젝트를 하면서 의존성을 분리하려고 여러가지 패턴, 스택을 사용해왔다. 특히 이번 Mafia Together에서 SSE를 적용하면서 SSE를 관리하는 로직들이 Game에 있게 되면서 타 어그리게이트에서 SSE 통신하기 위해서는 Game에 의존을 하게 되었다. 이러한 상황에서 Game은 거의 모든 클래스에 의존성을 가지고 있어 순환 참조가 될 것으로 예상이 되었다. 그래서 우리는 이 SSE 를 분리할 필요가 생겼다. 그동안 사용한 의존성 분리에는 DIP, Event, AOP가 있었는데 이번 기회에 어떤 상황에 어떤 방법을 사용할지 생각해보면 좋을 것 같아 적게되었다.2. 의존성이란의존성이란 의존하는 대상의 변화가 본인에게 영향을 줄 가능성이 있는 경우를 말한다.예를 들어 A와 B가 다음과 ..

학습 2024.11.01