본문 바로가기 메뉴 바로가기

Jaime's 기술 블로그

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Jaime's 기술 블로그

검색하기 폼
  • All (499)
    • IntelliJ IDEA (8)
    • SpringBoot (83)
      • Web Application 만들기 (71)
      • JWT 튜토리얼 (5)
    • Java (19)
    • JPA (33)
    • Querydsl (14)
    • SRE (7)
    • gRPC (10)
    • macOS (7)
    • Docker (1)
    • Linux (5)
    • R (5)
    • Test (3)
    • ETC (13)
    • Algorithm (265)
      • LeetCode (258)
    • Retrospect (4)
    • git (1)
    • Architecture (8)
    • Book (10)
      • 함께 자라기 (7)
      • 프로그래머의 뇌 (3)
    • Essay (1)
  • 방명록

전체 글 (499)
188. Best Time to Buy and Sell Stock IV

소스 코드는 여기 있습니다. 문제는 여기 있습니다. 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] ..

Algorithm/LeetCode 2022. 9. 13. 12:00
JPA @Where 애너테이션

DB에서 물리적으로 데이터를 지우는 것이 아니라 논리적으로 삭제하는 방법이 있습니다. 많이 사용하는 방법 중 하나가 바로 삭제 여부를 판단하는 컬럼을 사용하는 것인데요, 삭제 된 날짜가 존재하면 정확한 삭제 시기를 알 수 있으므로 deleted_at과 같은 컬럼을 사용할 수 있습니다. 하지만 이런 컬럼이 존재할 경우 정상 데이터를 조회하기 위한 모든 쿼리에 where deleted_at is null과 같은 조건절이 필요합니다. 이럴 때 @Where 애너테이션을 활용하면 간단히 해결할 수 있습니다. 먼저 BaseEntity를 생성해줍니다. package io.lcalmsky.wheredemo; import java.time.LocalDateTime; import javax.persistence.Colum..

JPA 2022. 9. 12. 12:00
1996. The Number of Weak Characters in the Game

소스 코드는 여기 있습니다. 문제는 여기 있습니다. 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..

Algorithm/LeetCode 2022. 9. 11. 12:00
94. Binary Tree Inorder Traversal

소스 코드는 여기 있습니다. 문제는 여기 있습니다. 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 순으로 재..

Algorithm/LeetCode 2022. 9. 10. 12:00
144. Binary Tree Preorder Traversal

소스 코드는 여기 있습니다. 문제는 여기 있습니다. 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

Algorithm/LeetCode 2022. 9. 9. 12:30
814. Binary Tree Pruning

소스 코드는 여기 있습니다. 문제는 여기 있습니다. 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 ..

Algorithm/LeetCode 2022. 9. 8. 12:00
429. N-ary Tree Level Order Traversal

소스 코드는 여기 있습니다. 문제는 여기 있습니다. 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..

Algorithm/LeetCode 2022. 9. 7. 12:00
프로그래머가 이메일에 대해 믿는 거짓들(펌)

원문은 여기 있습니다. 퍼온 글은 여기 있습니다. 모든 사람은 이메일 주소가 있다 모든 사람은 딱 하나의 이메일 주소가 있다 이메일 주소는 절대 변하지 않는다 이메일 주소가 변하더라도, 사용자 관리하에 있다 이메일 주소가 변하더라도, 사용자가 특별히 요청한 것이다 이메일 주소가 변하더라도, 기존 주소는 계속 동작/존재 한다 하나의 이메일 주소는 한 사람만을 나타낸다 고유한 문자열은 모두 다른 이메일 주소에 매핑된다 모든 이메일 시스템은 중앙화된 시스템에 의해 호스트 된다 특정 도메인의 사용자에게 이메일이 발송되면, 해당 도메인과 일치하는 서버로 전달된다 특정 도메인의 사용자로부터 이메일이 발송되면, 그 도메인과 일치하는 서버로부터 전송된 것이다 모든 이메일은 .com , .net, .edu, .org 주..

ETC 2022. 9. 6. 12:00
415. Add Strings

소스 코드는 여기 있습니다. 문제는 여기 있습니다. 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:..

Algorithm/LeetCode 2022. 9. 5. 12:00
967. Numbers With Same Consecutive Differences

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Return all non-negative integers of length n such that the absolute difference between every two consecutive digits is k. Note that every number in the answer must not have leading zeros. For example, 01 has one leading zero and is invalid. You may return the answer in any order. Example 1: Input: n = 3, k = 7 Output: [181,292,707,818,929] Explanation: Note t..

Algorithm/LeetCode 2022. 9. 4. 12:00
637. Average of Levels in Binary Tree

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given the root of a binary tree, return the average value of the nodes on each level in the form of an array. Answers within 10-5 of the actual answer will be accepted. Example 1: Input: root = [3,9,20,null,null,15,7] Output: [3.00000,14.50000,11.00000] Explanation: The average value of nodes on level 0 is 3, on level 1 is 14.5, and on level 2 is 11. Hence re..

카테고리 없음 2022. 9. 3. 12:00
1448. Count Good Nodes in Binary Tree

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X. Return the number of good nodes in the binary tree. Example 1: Input: root = [3,1,4,3,null,1,5] Output: 4 Explanation: Nodes in blue are good. Root Node (3) is always a good node. Node 4 -> (3,4) is the maximum value in th..

Algorithm/LeetCode 2022. 9. 2. 12:00
커스텀 애너테이션에 @AliasFor 활용하기

스프링 프레임워크를 이용해 개발하면서 커스텀 애너테이션을 사용해야할 때가 있습니다. 저는 최근 헥사고날 아키텍처를 적용하면서 어댑터, 유스케이스 등 기존의 @Controller, @Service와 매핑될만한 클래스들에 대해 커스텀 애너테이션을 사용하고 있는데요, 사용할 때 기존 기능을 유지해야하기 때문에 보통 기존 애너테이션을 커스텀 애너테이션에 추가하여 사용합니다. package io.lcalmsky.demo.infrastructure.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.an..

SpringBoot 2022. 9. 1. 12:00
869. Reordered Power of 2

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given an integer n. We reorder the digits in any order (including the original order) such that the leading digit is not zero. Return true if and only if we can do this so that the resulting number is a power of two. Example 1: Input: n = 1 Output: true Example 2: Input: n = 10 Output: false Constraints: 1 test(10, false) ); } private void test(int gi..

Algorithm/LeetCode 2022. 8. 31. 12:00
200. Number of Islands

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example 1: Input: grid = [ ["1","1","1","1","0"], ["1","1","0","1..

Algorithm/LeetCode 2022. 8. 30. 10:30
이전 1 2 3 4 5 6 7 8 ··· 34 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • github
TAG
  • 헥사고날 아키텍처
  • spring boot jwt
  • 스프링 부트 애플리케이션
  • JSON
  • 스프링부트
  • 스프링 부트 회원 가입
  • proto3
  • 클린 아키텍처
  • Jackson
  • @ManyToOne
  • spring boot app
  • spring boot application
  • Spring Boot JPA
  • Spring Boot Tutorial
  • 함께 자라기
  • 스프링 부트
  • Spring Data JPA
  • QueryDSL
  • Java
  • 알고리즘
  • JPA
  • leetcode
  • 스프링 데이터 jpa
  • 함께 자라기 후기
  • 스프링 부트 튜토리얼
  • gRPC
  • Spring Boot
  • intellij
  • r
  • Linux
more
«   2025/09   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바