헝D의 일기장
[프로그래머스] 피로도 java (LEVEL2)
코테풀이 2023. 4. 30. 15:34

https://school.programmers.co.kr/learn/courses/30/lessons/87946 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 나의풀이 class Solution { static boolean[] visited; static int answer=0; public int solution(int k, int[][] dungeons) { visited= new boolean[dungeons.length]; dfs(0, k, dungeons); return answer; } public void dfs(int depth, int..

[프로그래머스] 전력망을 둘로 나누기 java (LEVEL2)
코테풀이 2023. 4. 30. 15:33

https://school.programmers.co.kr/learn/courses/30/lessons/86971 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 나의풀이 import java.util.*; class Solution { static int[][]map; public int solution(int n, int[][] wires) { int answer = n; map = new int[n+1][n+1]; for(int i = 0;i

[프로그래머스] 모음사전 java 자바 (LEVEL2)
코테풀이 2023. 4. 30. 15:31

https://school.programmers.co.kr/learn/courses/30/lessons/84512 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr import java.util.*; class Solution { static char[]alph = {'A','E','I','O','U'}; static List list; public int solution(String word) { list= new ArrayList(); combination(0,""); Collections.sort(list); return list.indexOf(word..