전체 글
-
[백준] 17136번 : 색종이 붙이기 - 자바(JAVA)알고리즘/백준 2022. 6. 26. 00:01
https://www.acmicpc.net/problem/17136 17136번: 색종이 붙이기 과 같이 정사각형 모양을 한 다섯 종류의 색종이가 있다. 색종이의 크기는 1×1, 2×2, 3×3, 4×4, 5×5로 총 다섯 종류가 있으며, 각 종류의 색종이는 5개씩 가지고 있다. 색종이를 크 www.acmicpc.net 문제 해석 다섯 종류의 색종이가 존재하고 각 종류의 색종이는 5개씩 가지고 있다 (총 25개) 크기가 10 x 10인 종이 위에 붙이려고 한다 각각의 칸은 0 또는 1이 적혀 있고 1이 적힌 칸은 모두 색종이로 덮여야 한다. 0이 적힌 칸에는 색종이가 있으면 안된다. 색종이는 종이의 경계 밖으로 나가서는 안된다. 종이가 주어졌을 때 1이 적힌 모든 칸을 붙이는데 필요한 색종이의 최소 개수..
-
NGINX란?MSA & 쿠버네티스(Kubernetes) - k8s 2022. 6. 25. 00:01
NGINX란? NGINX는 웹 서비스, 리버스 프록시, 캐싱, 로드 밸런싱, 미디어 스트리밍 등을 위한 오픈 소스 소프트웨어입니다. 최대 성능과 안정성을 위해 설계된 웹 서버로 시작했습니다. HTTP 서버 기능 외에도 NGINX는 이메일용 프록시 서버와 HTTP(TCP/UDP) 서버용 리버스 프록시 및 로드 밸런서로도 사용할 수 있습니다. 프록시 개념잡기 리버스 프록시, 프록시 서버에 대한 이야기가 나옵니다. 프록시란 대리인이라는 뜻을 가지는 단어로 두 PC가 통신을 할 때 중간에 들어가 있는 중계 서버입니다. 인터넷망을 기준 이 프록시 서버가 어디에 위치하느냐에 따라 포워드 프록시/ 리버스 프록시로 나뉘게 됩니다. Forward Proxy Reverse Proxy 좀 더 자세하게 알고 싶으면 다음글을 ..
-
@SpringBootApplication의 역할Spring Framework 2022. 6. 24. 00:01
Spring Boot 프로젝트를 생성한 후 main 메서드는 아래와 같습니다. @SpringBootApplication public class AnthillApplication { public static void main(String[] args) { SpringApplication.run(AnthillApplication.class, args); } } @SpirngBootApplication 내부로 들어가 보면 아래와 같습니다. @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Inherited @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(exc..
-
JPA 게시판 엔티티 만들기프로젝트/게시판 프로젝트 2022. 6. 23. 16:19
목표 회원이 작성하는 게시글의 Entity를 만들자 회원과 게시글의 연관관계 회원은 게시글을 여러 개 쓸 수 있습니다. 이에 따라 회원과 게시글의 관계는 1 : N으로 볼 수 있습니다. 회원 1명은 게시글 N개를 가질 수 있음 "JPA 1:N 연관관계" 키워드에 대해 검색해보겠습니다. 1:N 연관관계에 대해서 알아보기 전에 JPA의 연관관계에 대해서 먼저 학습하겠습니다. JPA 연관관계 매핑 정리 엔티티는 다른 엔티티의 참조를 가지면서 서로 관계를 맺게 됩니다. 회원이 게시글을 작성하는 경우 게시글 엔티티는 회원 엔티티 필드를 가지면서 서로 연관관계를 맺어 해당 게시글을 작성한 회원을 조회할 수 있습니다. 또한 서로 연관관계를 맺으면 회원이 어떤 게시글들을 작성했는지를 알 수 있습니다. 객체와 DB의 방..
-
[프로그래머스] 메뉴 리뉴얼 - 2021 KAKAO BLIND RECRUITMENT 메뉴 리뉴얼알고리즘/프로그래머스 2022. 6. 23. 00:01
https://programmers.co.kr/learn/courses/30/lessons/72411 코딩테스트 연습 - 메뉴 리뉴얼 레스토랑을 운영하던 스카피는 코로나19로 인한 불경기를 극복하고자 메뉴를 새로 구성하려고 고민하고 있습니다. 기존에는 단품으로만 제공하던 메뉴를 조합해서 코스요리 형태로 재구성해서 programmers.co.kr 문제 해석 기존 단품으로만 제공하는 메뉴를 조합해서 코스요리 형태로 재구성하려고 합니다. 손님들이 주문할 때 가장 많이 함께 주문한 단품메뉴들을 코스요리로 구성하려고 합니다. 최소 2가지 이상의 단품메뉴로 구성하려고 합니다. 또한 최소 2명 이상의 손님으로부터 주문된 단품메뉴 조합에 대해서만 코스요리 메뉴 후보에 포함합니다. 예를 들어 6명이 손님한 단품메뉴들의 ..
-
[백준] 2243번 : 사탕상자 - 자바(JAVA)알고리즘/백준 2022. 6. 22. 00:01
https://www.acmicpc.net/problem/2243 2243번: 사탕상자 첫째 줄에 수정이가 사탕상자에 손을 댄 횟수 n(1 ≤ n ≤ 100,000)이 주어진다. 다음 n개의 줄에는 두 정수 A, B, 혹은 세 정수 A, B, C가 주어진다. A가 1인 경우는 사탕상자에서 사탕을 꺼내는 경우이 www.acmicpc.net 문제 해석 사탕의 맛이 좋고 나쁨이 1부터 1,000,000까지의 정수로 구분된다. 1이 가장 맛있는 사탕이며 1,000,000은 가장 맛없는 사탕입니다. 사탕상자의 손을 댄 횟수는 10만번 A,B 또는 A,B,C가 입력으로 주어진다. A = 1 이라면 사탕을 꺼내는 경우이다. A = 2 라면 사탕을 넣는 경우이다. 이때 B는 넣을 사탕의 맛을 나타내는 정수이고 C는 그..
-
[백준] 1725번 : 히스토그램 - 자바(JAVA)알고리즘/백준 2022. 6. 21. 00:01
https://www.acmicpc.net/problem/1725 1725번: 히스토그램 첫 행에는 N (1 ≤ N ≤ 100,000) 이 주어진다. N은 히스토그램의 가로 칸의 수이다. 다음 N 행에 걸쳐 각 칸의 높이가 왼쪽에서부터 차례대로 주어진다. 각 칸의 높이는 1,000,000,000보다 작거나 같은 www.acmicpc.net 문제 해석 다음과 같은 히스토그램이 주어졌을때 내부의 넓이가 가장 큰 직사각형을 그리려고 합니다. 이때 가장 큰 직사각형의 넓이를 구하는 프로그램을 작성하세요 문제 풀이 전 설계 문제에서 직사각형의 넓이가 20억을 넘지 않는다고 하였으므로 int형을 사용해도 될 것 같습니다. 히스토그램의 가로 칸의 최대수는 10만이기 때문에 O(NlogN) 시간복잡도로 해결해야 할 것..
-
Git 커밋 메시지 컨벤션Git 2022. 6. 20. 11:53
Commit Message Convention이란? Convention이란 협약, 관례, 관습과 같은 의미를 가지고 있습니다. 아마 Code Convention이라는 말을 들어보신 적 있을 수도 있습니다. 여기서 사용되는 Convention이라는 의미는 "팀별로 협의해서 사용하는 스타일 규약"입니다. Convention의 등장 배경 / 필요성 깃은 보통 협업을 위해서 많이 사용됩니다. 다른 사람과 협업하기 위해서 Commit Message를 작성할 때 팀별로 협의한 규칙을 적용한다면 다른 사람이 작성한 Commit 메시지를 보고도 한눈에 어떤 의미인지 파악할 수 있게 됩니다. 유다시티 컨벤션 유다시티는 대규모 온라인 코스를 제공하는 교육기관입니다. 가장 흔히 쓰이는 커밋 메시지 스타일인 유다시티의 스타일..