전체 글
-
1249. [S/W 문제해결 응용] 4일차 - 보급로 - 자바(JAVA)알고리즘/SW Expert Academy 2022. 5. 24. 00:01
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV15QRX6APsCFAYD SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 문제 해석 도로를 지나가야 하는데 도로가 파여진 깊이에 비례하여 복구 시간이 증가합니다. 출발지에서 도착지까지 가는 경로 중에서 복구 시간이 가장 짧은 경로에 대한 총 복구 시작을 구하시오. 깊이가 1이라면 복구에 드는 시간은 1입니다. 각 테스트 케이스마다 지도의 크기(N x N)이 주어지며 출발지(S)와 도착지(G)는 좌상단과 우하단이 됩니다. 문제 풀이 전 설계 (0,0) -> (N-1, N-..
-
5643. [Professional] 키 순서 - 자바(JAVA)알고리즘/SW Expert Academy 2022. 5. 23. 00:01
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWXQsLWKd5cDFAUo SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 문제 해석 1번부터 N번까지 번호가 붙어져 있는 학생들에 대하여 두 학생끼리 키를 비교한 결과의 일부가 주어져 있습니다. N명의 학생들의 키는 모두 다르다고 가정하겠습니다. ● 1번 학생의 키 < 5번 학생의 키 ● 3번 학생의 키 < 4번 학생의 키 ● 5번 학생의 키 < 4번 학생의 키 ● 4번 학생의 키 < 2번 학생의 키 ● 4번 학생의 키 < 6번 학생의 키 ● 5번 학생의 키 < 2번 학..
-
필터와 인터셉터의 차이점Spring Framework 2022. 5. 22. 02:49
필터란? 필터는 J2EE 표준 스펙 기능으로 디스패처 서블릿에 요청이 전달되기 전/후에 url 패턴에 맞는 모든 요청에 대해 부가 작업을 처리할 수 있는 기능을 제공합니다. 인터셉터란? 인터셉터는 J2EE 표준 스펙 기능은 아니고 Spring이 제공하는 기술로써 디스패처 서브릿이 컨트롤러를 호출하기 전과 후에 요청과 응답을 참조하거나 가공할 수 있는 기능을 제공합니다. 웹 컨텍스트에서 동작하는 필터와 달리 인터셉터는 스프링 컨텍스트에서 동작합니다. 실제로 Interceptor가 Controller로 요청을 하진 않지만 대략적으로 다음과 같은 처리 순서로 도식화만 했습니다. 필터와 인터셉터의 차이점 및 용도 관리되는 컨테이너가 다르다. 필터는 Dispatcher Servlet 호출 전, 인터셉터는 Disp..
-
[프로그래머스] 2021 KAKAO BLIND RECRUITMENT 신규 아이디 추천알고리즘/프로그래머스 2022. 5. 22. 00:01
https://programmers.co.kr/learn/courses/30/lessons/72410 코딩테스트 연습 - 신규 아이디 추천 카카오에 입사한 신입 개발자 네오는 "카카오계정개발팀"에 배치되어, 카카오 서비스에 가입하는 유저들의 아이디를 생성하는 업무를 담당하게 되었습니다. "네오"에게 주어진 첫 업무는 새로 programmers.co.kr 문제 해석 아이디 규칙에 맞지 않는 아이디를 입력했을 때, 입력된 아이디와 유사하면서 규칙에 맞는 아이디를 추천해주는 프로그램입니다. 다음은 카카오 아이디의 규칙입니다. - 아이디의 길이는 3자 이상 15자 이하여야 합니다. - 아이디는 알파벳 소문자, 숫자, 빼기, 밑줄, 마침표 문자만 사용할 수 있습니다. - 단 마침표는 처음과 끝에 사용할 수 없으면..
-
[백준] 스도쿠 : 2580번 - 자바(JAVA)알고리즘/백준 2022. 5. 21. 00:01
https://www.acmicpc.net/problem/2580 2580번: 스도쿠 스도쿠는 18세기 스위스 수학자가 만든 '라틴 사각형'이랑 퍼즐에서 유래한 것으로 현재 많은 인기를 누리고 있다. 이 게임은 아래 그림과 같이 가로, 세로 각각 9개씩 총 81개의 작은 칸으로 이루 www.acmicpc.net 문제 해석 스도쿠란 각각의 가로줄과 세로줄에는 1~9까지의 숫자가 한 번씩만 나타나야 합니다. 또한 3x3 정사각형 안에도 1~9까지의 숫자가 한번씩만 나타나야 합니다. 스도쿠의 빈칸의 경우에는 0으로 채워져 있으며 스도쿠 판을 채우는 방법이 여럿인 경우에는 그중 하나만을 출력합니다. 문제 풀이전 설계 스도쿠를 실제로 채우는 것처럼 진행해보고자 합니다. 재귀 함수를 통해서 해당 칸에 들어갈 수 있..
-
3307. 최장 증가 부분 수열알고리즘/SW Expert Academy 2022. 5. 20. 00:01
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWBOKg-a6l0DFAWr SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 문제 해석 어떤 수열의 증가하는 수열의 최대 크기를 찾으면 됩니다. 수열 1 3 2 5 4 정답 : 3 해석 : 1 -> 2 -> 4 또는 1-> 2 -> 5 또는 1 -> 3 -> 5 또는 1 _> 2 -> 4 의 최댓값은 3 수열 4 2 3 1 5 6 정답 : 4 해석 : 2 -> 3 -> 5 -> 6 문제 풀이 전 설계 DP를 활용하여 DP[i]에는 현재 i 값이 마지막으로 오는 최장 부분 수..
-
1263. [S/W 문제해결 응용] 8일차 - 사람 네트워크2알고리즘/SW Expert Academy 2022. 5. 20. 00:01
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV18P2B6Iu8CFAZN SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 문제 해석 네트워크 상에서 한 사용자가 다른 모든 사람에게 얼마나 가까운가를 구합니다. 이를 CC라고 칭하고 해당 값을 가장 작게 가지는 사람을 출력합니다. CC(i) = ∑ j dist(i,j)dist(i, j) 단, dist(i, j)는 노드 i로부터 노드 j까지의 최단 거리이다. 문제 해석 모든 순서쌍에 대하여 최단경로를 구해야 합니다. 다익스트라 or 플로이드 와샬 알고리즘을 사용하면 됩니다..
-
비밀번호를 암호화 하자!프로젝트/게시판 프로젝트 2022. 5. 19. 19:04
기존에는 그저 memberRequestDTO로 받아온 값을 그대로 저장했습니다. memberService.join(memberRequestDTO.toEntity()); 위의 방법은 유저의 비밀번호를 DB에 그대로 저장하게 됩니다. 이렇게 되면 DB를 관리하는 사람들이 유저의 비밀번호를 그대로 볼 수 있기 때문에 보안상으로 취약해집니다. 또한 법적으로도 개인정보에 대해 법률로 정하고 있고, 최소 기준도 제시하고 있습니다. 암호화란? 재화적 가치가 있는 데이터를 알아볼 수 없는 문자로 바꿈으로써 공격의 목적을 파괴하는 보안 솔루션입니다. 간단하게 어떤 정보를 누구도 알아볼 수 없도록 만들어 버립니다. 예를 들어 비밀번호 123456을 암호화해서 저장한다면 DB에는 fs32a3xzz0이 저장됩니다. 암호화는 ..