전체 글
-
[프로그래머스] 2021 카카오 채용연계형 인턴십 - 표 편집 - 자바(JAVA)알고리즘/프로그래머스 2022. 6. 7. 00:01
https://programmers.co.kr/learn/courses/30/lessons/81303 코딩테스트 연습 - 표 편집 8 2 ["D 2","C","U 3","C","D 4","C","U 2","Z","Z"] "OOOOXOOO" 8 2 ["D 2","C","U 3","C","D 4","C","U 2","Z","Z","U 1","C"] "OOXOXOOO" programmers.co.kr 문제 해석 표의 행을 선택, 삭제 , 복구하는 프로그램을 작성해야 합니다. 위의 그림에서 파란색으로 칠해진 칸은 현재 선택된 행을 나타냅니다. 한 번의 한 행만 선택할 수 있으며, 표의 범위를 벗어날 수 없습니다. 다음과 같은 명령어를 사용하여 표를 편집합니다. "U X": 현재 선택된 행에서 X칸 위에 있는 행..
-
[백준] 1941번 : 소문난 칠공주 - 자바(JAVA)알고리즘/백준 2022. 6. 6. 00:01
https://www.acmicpc.net/problem/1941 1941번: 소문난 칠공주 총 25명의 여학생들로 이루어진 여학생반은 5×5의 정사각형 격자 형태로 자리가 배치되었고, 얼마 지나지 않아 이다솜과 임도연이라는 두 학생이 두각을 나타내며 다른 학생들을 휘어잡기 시작 www.acmicpc.net 문제 해석 총 25명의 여학생들로 이루어진 여학생반은 5x5의 정사각형 격자 형태로 자리가 배치되었습니다. 이때 학생들이 S, Y 세력으로 갈라지게 되었습니다. 이때 세력 S파는 칠공주를 결성하고자 했습니다. 칠공주는 다음과 같은 규칙을 만족해야 합니다. 1. 7명으로 구성되어야 합니다. 2. 7명의 자리는 서로 가로나 세로로 반드시 인접해 있어야 합니다. 3. 반드시 S세력으로 구성될 필요는 없습니..
-
Mac OS란Mac OS 2022. 6. 5. 22:53
Mac OS란? Macintosh Operating System의 약자입니다. Apple에서 독점적으로 제공하는 UNIX 기반의 운영체제입니다. 운영체제란? Windows와 같은 컴퓨터 시스템의 자원들을 효율적으로 관리하여 사용자가 컴퓨터를 편리하고 효과적으로 사용할 수 있는 환경을 제공하는 소프트웨어입니다. UNIX란? 윈도우를 제외한 대부분의 운영 체제(리눅스,Mac OS)가 UNIX를 뿌리로 하고 있습니다. 이전의 운영체제들은 어셈블리어로 개발되었다면 고급언어인 C언어로 작성된 최조의 운영체제입니다. 매우 오랜 기간 사용되면서 안정성이 높아졌고, 다양한 하드웨어와 호환이 가능합니다. UNIX의 특징 Mac OS가 UNIX 기반으로 만들어졌기 때문에 UNIX에 대해서 조금 더 알아보겠습니다. 특징 대..
-
[백준] 5670번 : 휴대폰 자판 - 자바(Java)알고리즘/백준 2022. 6. 5. 00:01
https://www.acmicpc.net/problem/5670 5670번: 휴대폰 자판 휴대폰에서 길이가 P인 영단어를 입력하려면 버튼을 P번 눌러야 한다. 그러나 시스템프로그래밍 연구실에 근무하는 승혁연구원은 사전을 사용해 이 입력을 더 빨리 할 수 있는 자판 모듈을 개발 www.acmicpc.net 문제 해석 hello, hell, heaven, goodbye라는 단어가 있습니다. 이때 입력을 더 빨리 받기 위해 자동입력을 지원해줍니다. 만약 h를 누르게 된다면 h로 시작하는 모든 단어가 he를 가지기 때문에 자동으로 e를 입력해줍니다. 이후에 a를 누르게되면 hea -> 이후로 단어는 heaven이 유일하므로 heaven이 자동완성됩니다. (2번만에 완성) he 상태에서 l을 누르게 되면 hel..
-
[백준] 7432번 : 디스크 트리 - 자바(JAVA)알고리즘/백준 2022. 6. 4. 00:01
https://www.acmicpc.net/problem/7432 7432번: 디스크 트리 갑자기 맥북이 상근이의 손에서 떨어졌고, 화면이 켜지지 않았다. AS센터에 문의해보니 수리비가 97만원이 나왔고, 상근이는 큰 혼란에 빠졌다. 돈도 중요하지만, 상근이는 그 속에 들어있는 파 www.acmicpc.net 문제 해석 디렉토리의 경로가 주어졌을때, 디렉토리 구조를 보기 좋게 출력하는 프로그램을 작성하세요 공백은 디렉토리 구조상 깊이를 의미하며 서브 디렉토리는 사전순으로 출력해야 합니다. 입력의 값을 토대로 디렉토리 구조를 유추하는 문제입니다. 문제 풀이 전 설계 우선 \ 라는 역슬래시로 디렉토리가 구분됩니다. 계층구조를 가져야 하기 때문에 트리구조? (부모, 자식)을 활용하여 디렉토리 구조를 만들고 같..
-
JPA Table에 Unique Index 달기프로젝트/게시판 프로젝트 2022. 6. 3. 21:54
기존 코드에서 개선사항 발생 JPA의 회원 Entity를 생성할 때 다음과 같이 Unique Column을 지정했습니다. import lombok.*; import org.hibernate.annotations.DynamicUpdate; import javax.persistence.*; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter @Table(name = "member") @Entity @DynamicUpdate public class Member { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) //MySQL의 AUTO_INCREMENT를 사용 @Column(name = "member_id..
-
데이터베이스 ReplicationCS/데이터베이스 2022. 6. 2. 01:06
Replication이란? 사전적으로 "복제"라는 뜻을 가지고 있습니다. 이때 기준이 되는 서버를 마스터 서버라고 하며, 마스터 서버와 동일한 내용을 갖는 또 다른 서버를 리플리카라고 합니다. 애플리케이션은 데이터베이스에 SQL 명령을 보내 데이터를 삽입/변경/삭제하게 되는데 마스터 서버는 SQL 명령을 수신하면 그 SQL 명령을 리플리카 서버에도 똑같이 보냅니다. 이렇게 되면 마스터 서버와 리플리카 서버의 데이터가 동일한 상태로 유지됩니다. Why Replication? 굳이 복제하는 이유가 뭘까요? 바로 데이터의 안정성을 위함입니다. 어떤 원인으로 인해 데이터가 손상되었을 때, 가장 기초적인 대처는 백업을 가지는 것입니다. 하지만 백업이 얼마나 주기적으로 일어나는지에 따라 백업된 시간과 장애가 발생한..