[프로그래머스] Lv.2 피로도
·
Algorithm/프로그래머스
https://school.programmers.co.kr/learn/courses/30/lessons/87946 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 사용 알고리즘DFS백트래킹풀이class Solution { // current라는 현재값을 static boolean [] visited; static int ans = 0; public int solution(int k, int[][] dungeons) { visited = new boolean[dungeons.length]; dfs(k, dungeon..
[백준] Level IV. 빙산
·
Algorithm/백준
https://www.acmicpc.net/problem/2573  사용 알고리즘 BFS구현풀이 import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { /* 1. 4분면에 있는 0의 개수만큼 값이 줄어듬 2. 두 덩어리로 분리되는 최초의 시간을 구함 */ static int n, m; static int [][] board; static int [][] tmp; static boolean[][] visited; static int[] dx = {1, 0, -1, 0};..
[프로그래머스] Lv.2 게임 맵 최단 거리
·
Algorithm/프로그래머스 코딩테스트 문제풀이전략
https://school.programmers.co.kr/learn/courses/30/lessons/1844BFS 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 사용 알고리즘BFS풀이import java.util.*;class Solution { static int [] dx = {1,0,-1,0}; static int [] dy = {0,1,0,-1}; public int solution(int[][] maps) { int n = maps.length; int m = maps[0].length; int [][] ..
[프로그래머스] Lv.3 단어 변환
·
Algorithm/프로그래머스 코딩테스트 문제풀이전략
https://school.programmers.co.kr/learn/courses/30/lessons/43163/ 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 사용 알고리즘BFSDFS풀이BFS를 사용한 풀이 import java.util.*;class Solution { public int solution(String begin, String target, String[] words) { int answer = 0; boolean [] visited = new boolean[words.length]; Qu..
5/23 배포 TIL
·
배포
ec2에서 인스턴스 연결이 자꾸 실패하던 문제https://stackoverflow.com/questions/66884055/elastic-beanstalk-ec2-instance-connect-cant-connect Elastic Beanstalk & EC2 Instance Connect: Can't connectI created an Elastic Beanstalk environment from Visual Studio and need to login to service the underlying ec2 vm. I don't have an credentials for the server, so I wanted to use EC2 Instance Connect...stackoverflow.com 위 방..
[백준] Gold III. 감시
·
Algorithm/백준
https://www.acmicpc.net/problem/15683 사용 알고리즘DFS백트래킹풀이 import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { static int n, m; static int [][] board; static int total = Integer.MAX_VALUE; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamRea..
[백준] Gold IV. 연구소
·
Algorithm/백준
https://www.acmicpc.net/problem/14502 사용 알고리즘DFS백트래킹풀이 import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;/* 1. 백트래킹과 BFS를 활용하는 문제같음 2. 길이가 3이 될때까지 벽을 모두 배치하고, 백트래킹을 돌면서 계속 넓이를 구함 3. 최댓값을 계속 갱신해줌 */public class Main { static int n, m; static int [][] board; static boolean [][] visited; static int [] dx = {1, 0, -1, 0}; stat..
[프로그래머스] Lv.2 기능개발
·
Algorithm/프로그래머스 코딩테스트 문제풀이전략
https://school.programmers.co.kr/learn/courses/30/lessons/42586 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr  사용 알고리즘배열 큐풀이 import java.util.*;class Solution { public int[] solution(int[] progresses, int[] speeds) { int [] complete = new int[progresses.length]; for(int i = 0; i list = new ArrayList(..
[프로그래머스] Lv.2 주식 가격
·
Algorithm/프로그래머스 코딩테스트 문제풀이전략
https://school.programmers.co.kr/learn/courses/30/lessons/42584 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr  사용 알고리즘 스택풀이 import java.util.*;class Solution { public int[] solution(int[] prices) { int[] answer = new int[prices.length]; // 1. 다음 값이 현재 값보다 작을 때 // 2. 다음 값이 현재 값보다 클 때 -> ..
EC2 Test Build에서 생기는 오류
·
카테고리 없음
EC2에서 ./gradlew clean build # 기존 빌드된 파일을 삭제하고 새롭게 JAR로 빌드를 실행했는데, 위와 같은 에러가 계속 발생하였다. 해결법을 찾을 수 없어, 여러 블로그를 보니 테스트 디렉토리에서 @SpringBootTest, @Test를 주석처리 하는 것을 봐서 따라했더니 빌드에 성공했다.  추후에 테스트 코드를 작성하고 나서도 계속 문제가 발생한다면 추적해보도록 하겠다