분류 전체보기

코딩테스트/코딩테스트 문제풀이

[Java] 프로그래머스 <최댓값과 최솟값>

https://school.programmers.co.kr/learn/courses/30/lessons/12939 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr class Solution { public String solution(String s) { String answer = ""; String[] sa = s.split(" "); int[] num = new int[sa.length]; for(int i = 0; i max){ max = num[i]; }else i..

코딩테스트/코딩테스트 문제풀이

[Java] 프로그래머스 <영어 끝말잇기>

https://school.programmers.co.kr/learn/courses/30/lessons/12981 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr import java.util.*;class Solution { public int[] solution(int n, String[] words) { int[] answer = new int[2]; HashSet hashSet = new HashSet(); int cnt = 0; while(cnt

코딩테스트/코딩테스트 문제풀이

[Java] 프로그래머스 <할인 행사>

https://school.programmers.co.kr/learn/courses/30/lessons/131127 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr class Solution { public int solution(String[] want, int[] number, String[] discount) { int answer = 0; int day = 0; while (day 0) { // 하나라도 0보다 크면 실패 allMatched = false; break; ..

코딩테스트/코딩테스트 문제풀이

[Java] 프로그래머스 <N개의 최소공배수>

https://school.programmers.co.kr/learn/courses/30/lessons/12953 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr class Solution { public int solution(int[] arr) { int answer = 0; if(arr.length == 1) return arr[0]; int g = gcd(arr[0], arr[1]); answer = (arr[0] * arr[1]) / g; if(arr.length > 2) { for(int i = 2; i

Yang Ji Woo
'분류 전체보기' 카테고리의 글 목록 (35 Page)