📋오늘 푼 코딩테스트
https://school.programmers.co.kr/learn/courses/30/lessons/42840
프로그래머스
SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
import java.util.*;
class Solution {
public int[] solution(int[] answers) {
int[] p1 = {1,2,3,4,5};
int[] p2 ={2,1,2,3,2,4,2,5};
int[] p3 = {3,3,1,1,2,2,4,4,5,5};
int[] count = {0,0,0};
for(int i=0;i<answers.length;i++){
if(p1[i%p1.length]==answers[i]){
count[0]++;
}
if(p2[i % p2.length]==answers[i]){
count[1]++;
}
if(p3[i % p3.length]== answers[i]){
count[2]++;
}
}
int max = Math.max(count[0], Math.max(count[1], count[2]));
List<Integer> list = new ArrayList<>();
if(count[0] == max) list.add(1);
if(count[1] == max) list.add(2);
if(count[2] == max) list.add(3);
return list.stream().mapToInt(i -> i).toArray();
}
}
https://school.programmers.co.kr/learn/courses/30/lessons/12977
프로그래머스
SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
class Solution {
public int solution(int[] nums) {
int checknum = 0;
for (int i = 0; i < nums.length; i++) {
for (int j = i + 1; j < nums.length; j++) {
for (int l = j + 1; l < nums.length; l++) {
int num = nums[i] + nums[j] + nums[l];
boolean isNotPrime = false;
for (int k = 2; k <= Math.sqrt(num); k++) {
if (num % k == 0) {
isNotPrime = true;
break;
}
}
if (!isNotPrime) {
checknum++;
}
}
}
}
return checknum;
}
}
https://school.programmers.co.kr/learn/courses/30/lessons/161989
프로그래머스
SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
class Solution {
public int solution(int n, int m, int[] section) {
int answer = 0;
int distance = 0;
for (int i = 0; i < section.length; i++){
if (section[i] <= distance)
continue;
distance = section[i] + m - 1;
answer++;
}
return answer;
}
}
https://school.programmers.co.kr/learn/courses/30/lessons/136798
프로그래머스
SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
import java.util.Arrays;
class Solution {
public int solution(int number, int limit, int power) {
int answer = 0;
int[] list = new int[number];
for(int i=1;i<=number;i++){
int count = 0;
for(int j=1;j<=Math.sqrt(i);j++){
if(i%j==0){
count+=(j*j==i)?1:2;
}
}
if(count>limit){
count = power;
}
list[i-1] = count;
}
return Arrays.stream(list).sum();
}
}
📖 오늘 작성한 글
https://computerreport.tistory.com/119
[팀 프로젝트-JPA 활용 게시판] 댓글 기능 + orphanRemoval로 깔끔한 삭제 처리
https://github.com/jihwanprogramer/NewSfeed GitHub - jihwanprogramer/NewSfeedContribute to jihwanprogramer/NewSfeed development by creating an account on GitHub.github.com 나는 많은 기능 중에 댓글 기능을 맡아 구현을 진행하였다. 📌
computerreport.tistory.com
https://computerreport.tistory.com/120
[Spring/Security] 403 Forbidden? 권한 문제가 아니라 CSRF 이 원인이였다
intro프로젝트를 진행하며 발생한 문제 상황과 해결 과정들을 상세히 기록하고 추후에 같은 문제가 발생 했을때 빠르게 문제 해결하기 위해 트러블 슈팅을 정리할려고 한다.기록하는 습관을 기
computerreport.tistory.com
✒️ 회고
- 금융 IT 에서 중요한 JWT 공부하기
- 코딩테스트 Lv2 까진 완벽하게 구현가능하게 연습하기
- 내일부터 팀프로젝트 시작인데 적극적으로 참여하기
'TIL' 카테고리의 다른 글
[TIL]2025-04-23 (0) | 2025.04.29 |
---|---|
[TIL]2025-04-22 (1) | 2025.04.22 |
[TIL]2025-04-17 (1) | 2025.04.17 |
[TIL] 2025-04-16 (0) | 2025.04.16 |
[TIL]2025-04-15 (0) | 2025.04.16 |