본문 바로가기

전체 글202

[프로그래머스] 피로도 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/87946 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { //깊이 우선 탐색(DFS) static int answer = 0; static boolean[] visited; static boolean flag = false; public int solution(int k, int[][] dungeons) { //방문 배열 visited = new boolean[dungeons.length]; dfs(0,k.. 2024. 4. 14.
[프로그래머스] 최소직사각형 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/86491 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int solution(int[][] sizes) { int ga = sizes[0][0]; int se = sizes[0][1]; //가로, 세로 중에 가장 큰 길이를 골라서. 기준 길이로 잡는다. for(int i = 0; i 2024. 4. 13.
[프로그래머스] 모의고사 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/42840 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : import java.util.*; class Solution { public int[] solution(int[] answers) { int[] one = {1,2,3,4,5}; int[] two = {2,1,2,3,2,4,2,5}; int[] thr = {3,3,1,1,2,2,4,4,5,5}; int[] score = {0,0,0}; for(int i = 0 ; i 2024. 4. 10.
[프로그래머스] H-Index 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/42747 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : import java.util.Arrays; class Solution { public int solution(int[] citations) { int answer = 0; int len = citations.length; Arrays.sort(citations); for(int i = 0; i= h){ answer = h; break; } } return answer; } } .. 2024. 3. 24.
[프로그래머스] 예산 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/12982 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결1 : import java.util.Arrays; class Solution { public int solution(int[] d, int budget) { int answer = 0; int depart = 0; Arrays.sort(d); for(int i : d){ answer += i; if(budget >= answer){ ++depart; }else{ break; } } .. 2024. 3. 24.
[프로그래머스] 음양 더하기 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/76501 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int solution(int[] absolutes, boolean[] signs) { int answer = 0; for(int i = 0; i 2024. 3. 24.
[프로그래머스] 정렬 > 가장 큰 수 문제 :https://school.programmers.co.kr/learn/courses/30/lessons/42746 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 해결 :import java.util.*;class Solution { public String solution(int[] numbers) { String[] answer = new String[numbers.length]; for(int i =0; i(o2+o1).compareTo(o1+o2)); if(answer[0]... 2024. 3. 21.
[프로그래머스] 정렬 > K번째수 문제 :https://school.programmers.co.kr/learn/courses/30/lessons/42748 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 해결 :import java.util.Arrays;class Solution { public int[] solution(int[] array, int[][] commands) { int[] answer = new int[commands.length]; for(int i = 0; i 2024. 3. 20.
[코딩 기초 트레이닝] 정사각형으로 만들기 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181830 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int[][] solution(int[][] arr) { int max = Math.max(arr.length, arr[0].length); int[][] answer = new int[max][max]; for(int i = 0; i 2024. 3. 5.
[코딩 기초 트레이닝] 그림 확대 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181836 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : import java.util.*; class Solution { public String[] solution(String[] picture, int k) { List li = new ArrayList(); int len = picture.length; for(int i = 0; i 2024. 3. 5.
[코딩 기초 트레이닝] 특별한 2차원 배열 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181831 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int solution(int[][] arr) { for(int i = 0; i 2024. 3. 5.
[Web] Web Server와 WAS의 차이와 Web Service 구조 차이 1. 웹 서버 (Web Server)? HTTP 프로토콜을 사용하여 클라이언트로부터 요청을 받고, 정적인 콘텐츠 처리 (HTML, CSS, 이미지, JS) 대표적으로 아파치(Apache)와 엔진엑스(Nginx)가 있다. 웹 페이지의 전달과 같은 단순한 기능 수행 2. WAS (Web Application Server)? JSP, EJB, Servlet 등의 동적인 콘텐츠 생성과 데이터 처리에 특화 대표적으로 Apache Tomcat, Red Hat JBoss, IBM WebSphere 등이 있다. Web Server의 기능들을 분산 처리하고자 사용된다. (분산 환경에서 사용됨) 주로 DB와의 상호작용, 트랜잭션 관리, 보안, 로드 밸런싱, 비즈니스 로직 처리 등 다양한 기능 수행 '웹 컨테이너' 또는 '.. 2024. 2. 28.