[Algorithm / Programmers] 2019 카카오 개발자 겨울 인턴십 - 크레인 인형뽑기 게임
[Version] ⦁ 2024.04.02 / [Algorithm / Programmers] 2019 카카오 개발자 겨울 인턴십 - 크레인 인형뽑기 게임 import java.util.*; class Solution { public int solution(int[][] board, int[] moves) { // [0,0,0,0,0] // [0,0,1,0,3] // [0,2,5,0,1] // [4,2,4,4,2] // [3,5,1,3,1] int answer = 0; Stack stack = new Stack(); for(int i = 0; i < moves.length; i++) { int move = moves[i] - 1; for(int j = 0; j < board.length; j++) { if(..
2024. 4. 2.
[Algorithm / Programmers] 2020 카카오 인턴십 키패드 누르기
[Version] ⦁ 2024.04.02 / [Algorithm / Programmers] 2020 카카오 인턴십 키패드 누르기 import java.util.*; class Solution { public String solution(int[] numbers, String hand) { // L: 1, 4, 7, * // R: 3, 6, 9, # // B: 2, 5, 8, 0 Map map = new HashMap(); map.put("1", new int[] {0, 0}); map.put("2", new int[] {0, 1}); map.put("3", new int[] {0, 2}); map.put("4", new int[] {1, 0}); map.put("5", new int[] {1, 1}); ..
2024. 4. 2.