흥미로운 글이 있어 공유합니다. 원글은 여기서 확인할 수 있습니다. 프로그래머를 인터뷰할 때 텍스트 파일에서 단어 빈도를 세는 간단한 프로그램을 코딩하도록 요청합니다. 많은 기술을 테스트하고 몇 가지 후속 질문을 통해 놀라울 정도로 깊이 들어갈 수 있는 좋은 문제입니다. 후속 질문 중 하나는 "귀하의 프로그램에서 성능 병목 현상이 무엇입니까?"입니다. 대부분의 사람들은 "입력 파일에서 읽기"와 같은 말을 합니다. 실제로 성능을 측정해보기 전까지는 모두 같은 생각일 것입니다. 우리 모두 I/O는 느리다고 배웠기 때문입니다. 하지만 더 이상 I/O는 10년전, 20년전만큼 느리지 않습니다. 디스크에서 파일을 순차적으로 읽는 것은 매우 빠르기 때문입니다. 어떤 기기로, 방법으로 테스트했는지는 이 글에서 크게 ..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given an integer array prices where prices[i] is the price of a given stock on the ith day, and an integer k. Find the maximum profit you can achieve. You may complete at most k transactions. Note: You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again). Example 1: Input: k = 2, prices = [2,4,1] ..
DB에서 물리적으로 데이터를 지우는 것이 아니라 논리적으로 삭제하는 방법이 있습니다. 많이 사용하는 방법 중 하나가 바로 삭제 여부를 판단하는 컬럼을 사용하는 것인데요, 삭제 된 날짜가 존재하면 정확한 삭제 시기를 알 수 있으므로 deleted_at과 같은 컬럼을 사용할 수 있습니다. 하지만 이런 컬럼이 존재할 경우 정상 데이터를 조회하기 위한 모든 쿼리에 where deleted_at is null과 같은 조건절이 필요합니다. 이럴 때 @Where 애너테이션을 활용하면 간단히 해결할 수 있습니다. 먼저 BaseEntity를 생성해줍니다. package io.lcalmsky.wheredemo; import java.time.LocalDateTime; import javax.persistence.Colum..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are playing a game that contains multiple characters, and each of the characters has two main properties: attack and defense. You are given a 2D integer array properties where properties[i] = [attacki, defensei] represents the properties of the ith character in the game. A character is said to be weak if any other character has both attack and defense lev..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given the root of a binary tree, return the inorder traversal of its nodes' values. Example 1: Input: root = [1,null,2,3] Output: [1,3,2] Example 2: Input: root = [] Output: [] Example 3: Input: root = [1] Output: [1] Constraints: The number of nodes in the tree is in the range [0, 100]. -100 3 순으로, inorder의 경우 1 -> 2 -> 3 순으로, postorder의 경우 1 -> 3 -> 2 순으로 재..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given the root of a binary tree, return the preorder traversal of its nodes' values. Example 1: Input: root = [1,null,2,3] Output: [1,2,3] Example 2: Input: root = [] Output: [] Example 3: Input: root = [1] Output: [1] Constraints: The number of nodes in the tree is in the range [0, 100]. -100
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given the root of a binary tree, return the same tree where every subtree (of the given tree) not containing a 1 has been removed. A subtree of a node node is node plus every node that is a descendant of node. Example 1: Input: root = [1,null,0,0,1] Output: [1,null,0,null,1] Explanation: Only the red nodes satisfy the property "every subtree not containing a ..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an n-ary tree, return the level order traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null value (See examples). Example 1: Input: root = [1,null,3,2,4,null,5,6] Output: [[1],[3,2,4],[5,6]] Example 2: Input: root = [1,null,2,3,4,5,null,null,6,7,null,8..
원문은 여기 있습니다. 퍼온 글은 여기 있습니다. 모든 사람은 이메일 주소가 있다 모든 사람은 딱 하나의 이메일 주소가 있다 이메일 주소는 절대 변하지 않는다 이메일 주소가 변하더라도, 사용자 관리하에 있다 이메일 주소가 변하더라도, 사용자가 특별히 요청한 것이다 이메일 주소가 변하더라도, 기존 주소는 계속 동작/존재 한다 하나의 이메일 주소는 한 사람만을 나타낸다 고유한 문자열은 모두 다른 이메일 주소에 매핑된다 모든 이메일 시스템은 중앙화된 시스템에 의해 호스트 된다 특정 도메인의 사용자에게 이메일이 발송되면, 해당 도메인과 일치하는 서버로 전달된다 특정 도메인의 사용자로부터 이메일이 발송되면, 그 도메인과 일치하는 서버로부터 전송된 것이다 모든 이메일은 .com , .net, .edu, .org 주..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string. You must solve the problem without using any built-in library for handling large integers (such as BigInteger). You must also not convert the inputs to integers directly. Example 1: Input: num1 = "11", num2 = "123" Output: "134" Example 2: Input:..
- Total
- 224,073
- Today
- 0
- Yesterday
- 349
- 헥사고날 아키텍처
- spring boot application
- spring boot app
- 함께 자라기
- Spring Boot JPA
- 스프링 데이터 jpa
- Jackson
- 함께 자라기 후기
- JSON
- Linux
- spring boot jwt
- Spring Boot
- 스프링부트
- Spring Boot Tutorial
- QueryDSL
- Java
- gRPC
- proto3
- 스프링 부트 회원 가입
- 클린 아키텍처
- JPA
- 알고리즘
- intellij
- 스프링 부트 튜토리얼
- r
- Spring Data JPA
- 스프링 부트 애플리케이션
- 스프링 부트
- @ManyToOne
- leetcode