알고리즘/프로그래머스(34)
-
[ 프로그래머스 ] 복서 정렬하기 JAVA
문제 풀이 import java.util.*; class Solution { public int[] solution(int[] weights, String[] head2head) { int[] answer = new int[weights.length]; List list = new ArrayList(); for(int i=0; i
2021.10.01 -
[ 프로그래머스 ] 모음사전 JAVA
문제 설명 문제 풀이 import java.util.Arrays; class Solution { public int solution(String word) { int answer = 0; int[] intArr = new int[] {781, 156, 31, 6, 1}; Character[] charArr = {'A','E','I','O','U'}; for(int i=0; i
2021.09.30 -
[ 프로그래머스 ] 직업군 추천하기 JAVA
문제 설명 문제 풀이 class Solution { public String solution(String[] table, String[] languages, int[] preference) { String answer = ""; int max = 0, idx = 0; for(int i=0; i
2021.09.17 -
[ 프로그래머스 ] 상호평가 JAVA
문제 설명 문제 풀이 class Solution { public String solution(int[][] scores) { String answer = "", grade = "FFFFFDDCBA"; for(int i=0; i
2021.09.09 -
[ 프로그래머스 ] 부족한 금액 계산하기 JAVA
문제 설명 문제 풀이 class Solution { public long solution(int price, int money, int count) { long answer = 0; for(int i=1; i
2021.09.09 -
[ 프로그래머스 ] 전화번호 목록 C++ 해시
문제 설명 문제 풀이 #include #include using namespace std; bool solution(vector phone_book) { bool answer = true; for(int i=0; i
2020.01.04