์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. ๋ฌธ์ ๋ ์ฌ๊ธฐ ์์ต๋๋ค. Problem Given the head of a linked list, rotate the list to the right by k places. Example 1: Input: head = [1,2,3,4,5], k = 2 Output: [4,5,1,2,3] Example 2: Input: head = [0,1,2], k = 4 Output: [2,0,1] Constraints: The number of nodes in the list is in the range [0, 500]. -100
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. ๋ฌธ์ ๋ ์ฌ๊ธฐ ์์ต๋๋ค. Problem Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. We will use the integers 0, 1, and 2 to represent the color red, white, and blue, respectively. You must solve this problem without using the library's sort function. Example ..
๋ชจ๋ ์์ค ์ฝ๋๋ ์ฌ๊ธฐ์ ํ์ธ ๊ฐ๋ฅํฉ๋๋ค. ๋ฌธ์ ๋งํฌ๋ ์ฌ๊ธฐ ์์ต๋๋ค. Problem Given the head of a linked list, remove the nth node from the end of the list and return its head. Example 1: Input: head = [1,2,3,4,5], n = 2 Output: [1,2,3,5] Example 2: Input: head = [1], n = 1 Output: [] Example 3: Input: head = [1,2], n = 1 Output: [1] Constraints: The number of nodes in the list is sz. 1 test(ListNode.of(1, 2, 3), 1, ListNode..
๋ชจ๋ ์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. LeetCode์์ ์๊ณ ๋ฆฌ์ฆ ๋ฌธ์ ๋ฅผ ํ๋ค๋ณด๋ฉด ListNode๋ฅผ ์ด์ฉํด ํ ์คํธ ํด์ผํ ์ผ์ด ๋ง์ด ์์ต๋๋ค. ํ ์คํธ ์ฝ๋๋ main ๋ฉ์๋ ๋ด์์ ๊ฐ์ฒด๋ฅผ ์์ฑํ๊ณ ListNode๋ฅผ ํ๋ผ๋ฏธํฐ๋ก ๋๊ฒจ์ฃผ๋ค๋ณด๋ฉด ๋งค์ฐ ๋ถํธํ ๊ฒฝ์ฐ๊ฐ ๋ง์ด ์์ต๋๋ค. ๋จผ์ LeetCode์์ ์ฃผ์ด์ง๋ ListNode๋ฅผ ์ดํด๋ณด๋ฉด public class ListNode { int val; ListNode next; ListNode() { } ListNode(int val) { this.val = val; } ListNode(int val, ListNode next) { this.val = val; this.next = next; } } ์ด๋ ๊ฒ ๋์ด์์ต๋๋ค. ๋จ์ํ๊ฒ ์์ฑ์๋ฅผ ํตํด value๋ฅผ ์ฃผ์ ํ๊ณ ๋ค์..
๋ชจ๋ ์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์ ํ์ธ ๊ฐ๋ฅํฉ๋๋ค. ๋ฌธ์ ๋งํฌ๋ ์ฌ๊ธฐ ์์ต๋๋ค. Problem A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks. You may imagine that nums[-1] = nums[n] = -โ. You must write an algorithm that runs in O(log n) time. Example 1: Input: nums = ..
- Total
- 180,578
- Today
- 58
- Yesterday
- 220
- r
- Linux
- ์คํ๋ง ๋ถํธ ํ์ ๊ฐ์
- ์คํ๋ง ๋ฐ์ดํฐ jpa
- Java
- spring boot app
- spring boot application
- ์คํ๋ง๋ถํธ
- @ManyToOne
- gRPC
- ์คํ๋ง ๋ถํธ ์ ํ๋ฆฌ์ผ์ด์
- ํจ๊ป ์๋ผ๊ธฐ
- intellij
- ์คํ๋ง ๋ถํธ ํํ ๋ฆฌ์ผ
- Jackson
- ํด๋ฆฐ ์ํคํ ์ฒ
- leetcode
- Spring Boot JPA
- JSON
- Spring Boot
- Spring Boot Tutorial
- ํจ๊ป ์๋ผ๊ธฐ ํ๊ธฐ
- ์๊ณ ๋ฆฌ์ฆ
- ์คํ๋ง ๋ถํธ
- proto3
- QueryDSL
- ํฅ์ฌ๊ณ ๋ ์ํคํ ์ฒ
- JPA
- Spring Data JPA
- spring boot jwt