본문 바로가기

입문5

코딩 테스트 입문 마무리 하루 4문제 씩 25일간 총 100개의 입문 문제를 풀었다. 기초적으로 정말 탄탄해진 기분이 들었고, 조금 더 어려운 문제에 도전해 보고싶은 결심도 생겨 뿌듯했다. 2025. 5. 17.
코딩테스트 입문 - Day 25 문자열 밀기import java.util.ArrayDeque;class Solution { public static int solution(String A, String B) { ArrayDeque ad = new ArrayDeque(); int cnt = 0; for(String s : A.split("")) { ad.addLast(s); } for(int i = 0 ; i 종이 자르기class Solution { public int solution(int M, int N) { return M * N - 1; }}연속된 수의 합class Solution { public .. 2025. 5. 17.
프로그래머스 - 코딩테스트 입문 Day 3 1. 나머지 구하기 class Solution { public int solution(int num1, int num2) { return num1 % num2; } }   2. 중앙값 구하기 import java.util.*; class Solution { public int solution(int[] array) { Arrays.sort(array); int idx = array.length / 2; return array[idx]; } }   3. 최빈값 구하기import java.util.*;class Solution { public int solution(int[] array) { int max.. 2025. 4. 5.
프로그래머스 - 코딩테스트 입문 Day 2 1. 두 수의 나눗셈import java.util.*;class Solution { public int solution(int num1, int num2) { return (int)Math.floor((float) num1 / (float) num2 * 1000); }}   2. 숫자 비교하기class Solution { public int solution(int num1, int num2) { if(num1 == num2){ return 1 ; } return -1 ; }}   3. 분수의 덧셈class Solution { public int[] solution(int numer1, int denom1, i.. 2025. 4. 5.
프로그래머스 - 코딩테스트 입문 Day 1 1. 두 수의 합 구하기class Solution { public int solution(int num1, int num2) { return num1 + num2; }}  2. 두 수의 차 구하기class Solution { public int solution(int num1, int num2) { return num1 - num2; }}  3. 두 수의 곱 구하기class Solution { public int solution(int num1, int num2) { return num1 * num2; }}  4. 몫 구하기class Solution { public int solution(int num1, int num2) { .. 2025. 4. 5.
728x90
반응형