소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target. The test cases are generated so that the answer can fit in a 32-bit integer. Example 1: Input: nums = [1,2,3], target = 4 Output: 7 Explanation: The possible combination ways are: (1, 1, 1, 1) (1, 1, 2) (1, 2, 1) (1, 3) (2, 1..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a double booking. A double booking happens when two events have some non-empty intersection (i.e., some moment is common to both events.). The event can be represented as a pair of integers start and end that represents a booking on the half-open ..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given a list of strings words and a string pattern, return a list of words[i] that match pattern. You may return the answer in any order. A word matches the pattern if there exists a permutation of letters p so that after replacing every letter x in the pattern with p(x), we get the desired word. Recall that a permutation of letters is a bijection from letter..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. You must write an algorithm with O(log n) runtime complexity. Example 1: Input: nums = [5,7,7,8,8,10], target = 8 Output: [3,4] Example 2: Input: nums = [5,7,7,8,8,10], target = 6 ..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions. Example 1: Input: head = [1,4,3,2,5,2], x = 3 Output: [1,2,2,4,3,5] Example 2: Input: head = [2,1], x = 2 Output: [1,2] Constraints..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given the head of a singly linked list and two integers left and right where left test(ListNode.of(1, 2, 3, 4, 5), 2, 4, ListNode.of(1, 4, 3, 2, 5)), () -> test(ListNode.of(3, 5), 1, 1, ListNode.of(3, 5)) ); } private void test(ListNode given, int m, int n, ListNode expected) { // when Solution reverseLinkedList2 = new Solution(); ListNode actual = reverseLin..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given an integer array matchsticks where matchsticks[i] is the length of the ith matchstick. You want to use all the matchsticks to make one square. You should not break any stick, but you can link them up, and each matchstick must be used exactly one time. Return true if you can make this square and false otherwise. Example 1: Input: matchsticks = [1..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. Example 1: Input: nums = [100,4,200,1,3,2] Output: 4 Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4. Example 2: Input: nums = [0,3,7,2,5,8,4,6,0,1] Outp..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. Example 1: Input: nums = [100,4,200,1,3,2] Output: 4 Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4. Example 2: Input: nums = [0,3,7,2,5,8,4,6,0,1] Outp..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings. You are giving candies to these children subjected to the following requirements: Each child must have at least one candy. Children with a higher rating get more candies than their neighbors. Return the minimum number of candies you need to have ..
- Total
- Today
- Yesterday
- Java
- Jackson
- JPA
- 함께 자라기
- Spring Boot Tutorial
- 함께 자라기 후기
- Spring Data JPA
- 스프링 부트
- spring boot app
- @ManyToOne
- Linux
- 헥사고날 아키텍처
- 스프링 부트 튜토리얼
- gRPC
- r
- 스프링 데이터 jpa
- Spring Boot JPA
- 스프링부트
- QueryDSL
- intellij
- spring boot jwt
- 스프링 부트 회원 가입
- JSON
- Spring Boot
- 클린 아키텍처
- spring boot application
- leetcode
- 스프링 부트 애플리케이션
- 알고리즘
- proto3
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |