분류 전체보기
-
백준 7568번 : 덩치알고리즘, SQL/알고리즘 2023. 12. 12. 15:19
https://www.acmicpc.net/problem/7568 7568번: 덩치 우리는 사람의 덩치를 키와 몸무게, 이 두 개의 값으로 표현하여 그 등수를 매겨보려고 한다. 어떤 사람의 몸무게가 x kg이고 키가 y cm라면 이 사람의 덩치는 (x, y)로 표시된다. 두 사람 A 와 B의 덩 www.acmicpc.net 예시 이름 (몸무게, 키) 등수 A (55, 185) 2 B (58, 183) 2 C (88, 186) 1 D (60, 175) 2 E (46, 155) 5 위 표에서 C보다 더 큰 덩치의 사람이 없으므로 C는 1등이 된다. 그리고 A, B, D 각각의 덩치보다 큰 사람은 C뿐이므로 이들은 모두 2등이 된다. 그리고 E보다 큰 덩치는 A, B, C, D 이렇게 4명이므로 E의 덩치는 ..
-
배포, 컴파일, 빌드, CI/CD란 무엇인가?Java 2023. 12. 11. 22:21
프로젝트를 하면서 WAS에서만 프로젝트를 돌리고 따로 배포를 하지 못했었다. 그래서 따로 배포와 관련된 공부를 하지 않았었기에 하나씩 알아가 보려고 한다. 컴파일 번역가가 영어로된 글을 한글로 바꿔주듯, 컴퓨터가 이해할 수 있는 언어로 바꿔주는 과정을 말한다. 빌드 번역된 글을 책으로 엮어주는 것과 같이, 컴파일된 코드를 실행할 수 있는 상태로 만들어주는 과정이다. 보통 컴파일을 포함한 배포하기 직전의 모든 과정을 빌드라고 표현하기도 한다. 빌드 툴로는 빌드 툴로는 Ant, Maven, Gradle 등이 있다. 배포 빌드가 완성된 실행 파일(JAR, WAR)을 사용자가 접근할 수 있는 환경에 배치시키는 일을 뜻한다. JAR : Java Archive의 약자로 Java어플리케이션이 동작할 수 있돌고 자바 ..
-
queue란 무엇인가?알고리즘, SQL/알고리즘 2023. 12. 10. 22:40
개요 알고리즘 문제를 하나씩 풀다보니 자료구조와 관련된 문제가 나오는데, 큐 메서드들이 헷갈리는게 많아서 한번 정리해야겠다 싶었다. queue란 무엇인가? Queue의 사전적 의미는 무엇을 기다리는 사람, 차량 등의 줄 혹은 줄을 서서 기다리는 것을 의미하는데, 이처럼 줄을 지어서 순서대로 처리되는 것을 큐(queue)라고 한다. 큐는 자료를 쌓아두는 스택(Stack)과 다르게 FIFO(First In First Out)의 구조로 먼저 들어온 데이터가 먼저 나가게 된다.(스택은 First In Last Out의 구조를 가진다.) queue의 특징 1. 먼저 들어온 데이터가 먼저 나가는 FIFO(First In First Out)의 구조이다. 2. 큐는 맨 앞쪽을 front라고 정해서 삭제연산만 수행한다...
-
[리팩토링] 가독성을 위한 리팩토링2프로젝트/웹 ERD 프로젝트 2023. 12. 8. 23:59
지난번 포스팅했던 코드를 리뷰받았는데. 가독성이 떨어지는 것을 따로 private 메서드로 만들어서 가독성을 높혔었었던 작업을 더 진행하면 좋을것 같다고 했다. 그리고 null값으로 직접 비교 하는게 아닌, isEmpty를 사용하면 더 좋겠다고 했다. 그래서 지난번 리팩토링에 이어서 추가적으로 가독성을 올리기 위해 비즈니스 로직들을 더 추상화 시켜봤다! 리팩토링 전 코드 @Transactional public String sendMail(MailDTO mailDto, String addressListStr, MultipartFile attachmentFile) { dao.saveMail(mailDto); //보낸 메일 고유번호 int recentMailNum = mailDto.getMail_num(); ..
-
백준 2164번 : 카드2알고리즘, SQL/알고리즘 2023. 12. 6. 23:59
https://www.acmicpc.net/problem/2164 2164번: 카드2 N장의 카드가 있다. 각각의 카드는 차례로 1부터 N까지의 번호가 붙어 있으며, 1번 카드가 제일 위에, N번 카드가 제일 아래인 상태로 순서대로 카드가 놓여 있다. 이제 다음과 같은 동작을 카드가 www.acmicpc.net 별 생각 없이 배열 사용하고 짝수 인덱스번호인 애들만 삭제해주면 되겠다 싶어서 만들었었는데, 생각한대로 안되길래 한시간 넘게 문제를 잡고있었다. 뭔가 될 거 같아서 다른 블로그에서 힌트만 살짝 보려고하니까 큐를 사용해서 너무 쉽게 푸는거 보고 머리가 띵했다. 풀이 public class Main { public static void main(String args[]) throws IOExcepti..
-
REST API란 무엇인가?CS 2023. 12. 5. 17:53
취업을 위해 모집공고를 보다보면 REST API/ RESTful API라는 단어를 찾아볼 수 있다. 그래서 지난 포스트에서 REST API에 대해 알아보고 정리를 하려고 했으나, HTTP API, HTTPmethod가 선행 되어야 할 것 같아서 HTTP API에 대해 먼저 정리를 했다. https://hsch19.tistory.com/23 HTTP API와 HTTP Method HTTP는 무엇인가? https://hsch19.tistory.com/4 HTTP 기초 HTTP란 HyperText Transfer Protocol 클라이언트와 서버간의 컨텐츠(HTML/JavaScript/Css/이미지 등)를 주고 받기위해 서로 알아볼 수 있는 메세지라고 할 수 있 hsch19.tistory.com REST란 무..
-
HTTP API와 HTTP MethodCS 2023. 12. 4. 23:58
HTTP는 무엇인가? https://hsch19.tistory.com/4 HTTP 기초 HTTP란 HyperText Transfer Protocol 클라이언트와 서버간의 컨텐츠(HTML/JavaScript/Css/이미지 등)를 주고 받기위해 서로 알아볼 수 있는 메세지라고 할 수 있다. HTML과 같은 Text파일뿐만 아니라 이미지 오디 hsch19.tistory.com HTTP란 간단하게 웹상에서 클라이언트와 서버간의 컨텐츠(HTML/JavaScript/Css/이미지 등)를 주고 받기위해 서로 알아볼 수 있는 메세지라고 할 수 있다. API는 무엇인가? API(Application Programming Interface)의 약자로 프로그램 간 상호작용을 위한 인터페이스를 나타낸다. 인터페이스 : 기기 ..
-
HashSet이란?알고리즘, SQL/알고리즘 2023. 12. 2. 23:59
개요 알고리즘을 공부를 위해 다시 한 번 정리해보고자 한다. Set이란? 데이터 자료구조 중 하나로 특정한 값들을 저장하는 추상자료형(interface)이다. Set은 비선형 구조이기 때문에 '순서'의 개념과 '인덱스'가 존재하지 않는다. 값들은 순서가 존재하지 않으며, 중복되지 않는다. 이는 수학에서 집합을 컴퓨터 구현한 것이다. 다른 모음(Collection)타입에서 특정원소를 검색하는 것이 주 업무인 반면, 집합은 대상 원소가 집합에 소속되어 있는지 여부를 검사한다. Set의 특성 데이터를 비순차적으로 저장할 수 있는 순열 자료구조 삽입(insert)한 데이터가 순서대로 저장되지 않는다. 수정 가능하다. 중복해서 삽입이 불가능하다.(중복값이 들어오면 하나의 값만 저장한다.) FastLookup이 필..