블로그
- 110 옮기기 갯수를 세둔 후 마지막에 한번에 넣는식으로 처리해야함 stack 을 사용해서 char[] 으로 쪼개 하나씩 넣기 110 만나면 제거 가장 마지막 0 뒤에 110 갯수만큼넣기 */ class Solution { public String[] solution(String[] s) { String[] answer = new String[s.length]; for(int i
- 프로그래머스 보행자천국 6 10 1 4 10 1 5 1 왼쪽과 위의 경우의 수를 더하면 현재 위치의 도달 가능한 경우의 수 직진만 가능한 경우의 수 때문에 배열을 1개 더 해서 3중배열로 해야함 */ class Solution { int MOD = 20170805; public int solution(int m, int n, int[][] cityMap) { int[][][] cntArr
- 프로그래머스 인사고과 완호 석차 계산 - PriorityQueue 에서 poll 하다가 완호의 총점과 동일하면 리턴 */ class Solution { public int solution(int[][]
- (수정 중)PCCP모의고사2회 보물지도 .*; class Solution { class MyData{ int posX; int posY; int len; boolean used; int beforeMovePoint; public = " + posX + " // posY == " + posY + " // len == " + len + " // used == " + used; } } public int solution
- 가장 먼 노드 .*; class Solution { class Node{ int node; List link = new LinkedList<>(); boolean visited = false ; int dist = 0; public Node(int n){ node = n; } } public int solution(int n, int[][] edge) { List li
- 순위 .*; class Solution { class Node { int node; int win_cnt = 0; int lose_cnt = 0; boolean visited = false toString(){ return "node == " +node+ " // win_cnt="+win_cnt+" // lose_cnt=" + lose_cnt; } } public int solution
- 프로그래머스 보석쇼핑 .*; class Solution { public int[] solution(String[] gems) { // 전체 종류 수 Set types = new HashSet<>
- 단어변환 .*; class Solution { public int solution(String begin, String target, String[] words) { Queue q = new
- 정수삼각형 .*; class Solution { public int solution(int[][] triangle) { int answer = 0; for(int i = 1;i 0){ left
- 예산(풀이중) .*; class Solution { public int solution(int[] budgets, int M) { int avg = M/budgets.length; int mod
1 페이지
다음 →