알고리즘53 [프로그래머스] 숫자 문자열과 영단어 프로그래머스 1단계 숫자 문자열과 영단어 https://programmers.co.kr/learn/challenges 문제 설명 풀이 class Solution { public int solution(String s) { String[] numbers = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"}; for (int i = 0; i < numbers.length; i++) { s = s.replaceAll(numbers[i], Integer.toString(i)); } return Integer.parseInt(s); } } 2022. 4. 24. [프로그래머스] 행렬의 덧셈 프로그래머스 1단계 행렬의 덧셈 https://programmers.co.kr/learn/challenges 문제 설명 풀이 class Solution { public int[][] solution(int[][] arr1, int[][] arr2) { int[][] answer = new int[arr1.length][arr1[0].length]; for(int i=0; i 2022. 4. 24. [프로그래머스] 완주하지 못한 선수 프로그래머스 1단계 완주하지 못한 선수 https://programmers.co.kr/learn/challenges 문제 설명 풀이 import java.util.*; class Solution { public String solution(String[] participant, String[] completion) { String answer = ""; Arrays.sort(participant); Arrays.sort(completion); for(int i=0; i 2022. 4. 24. [프로그래머스] 이상한 문자 만들기 프로그래머스 1단계 이상한 문자 만들기 https://programmers.co.kr/learn/challenges 문제 설명 풀이 class Solution { public String solution(String s) { String answer = ""; int count = 0; for(int i=0; i 2022. 4. 24. 이전 1 ··· 5 6 7 8 9 10 11 ··· 14 다음