본문 바로가기

코테29

코딩 테스트 입문 마무리 하루 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 24 치킨 쿠폰class Solution { public int solution(int chicken) { int answer = 0; int remain = 0; while(chicken > 0){ remain += chicken % 10; answer += chicken /= 10; } int remain2 = 0; while(remain > 0){ remain2 += remain % 10; answer += remain /= 10; } return answer + remain2 /10; }}이진수 더하기.. 2025. 5. 11.
코딩테스트 입문 - Day 23 특이한 정렬import java.util.Arrays;class Solution {public static int[] solution(int[] numlist, Integer n) { for (int i = 0; i numlist[secIdx]) { secIdx = j; } } // 자리 바꾸기 int temp = numlist[secIdx]; numlist[secIdx] = numlist[i]; numlist[i] = temp; } return numlist; }}등수 매기기import java.uti.. 2025. 5. 11.
코딩테스트 입문 - Day 22 저주의 숫자 3class Solution { public int solution(int n) { int tenc = 1; int thc = 1; while(tenc 평행class Solution { public int solution(int[][] dots) { return isParallel(dots[0], dots[1], dots[2], dots[3]) || isParallel(dots[0], dots[2], dots[1], dots[3]) || isParallel(dots[0], dots[3], dots[1], dots[2]) ? 1 : 0; } private boolean is.. 2025. 5. 11.
코딩테스트 입문 - Day 21 숨어있는 숫자의 덧셈 (2)class Solution { public int solution(String my_string) { StringBuilder sb = new StringBuilder(); int answer = 0; for(int i =0;i안전지대class Solution { int answer = 0; int [] di = {-1,-1,-1,0,1,1,1,0}; int [] dj = {-1,0,1,-1,-1,0,1,1}; public int solution(int[][] board) { for(int i = 0; i = 0 && pi = 0 && pj 삼각형의 완성 조건 (2)class Solution { .. 2025. 5. 5.
728x90
반응형