์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. ๋ฌธ์ ๋ ์ฌ๊ธฐ ์์ต๋๋ค. 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๋ฅผ ์ฃผ์ ํ๊ณ ๋ค์..
- Total
- 71,750
- Today
- 113
- Yesterday
- 133
- Linux
- ์คํ๋ง ๋ถํธ
- QueryDSL
- ์คํ๋ง ๋ถํธ ํ์ ๊ฐ์
- Spring Boot
- Jackson
- ์คํ๋ง๋ถํธ
- JSON
- ์คํ๋ง ๋ถํธ ์ ํ๋ฆฌ์ผ์ด์
- ์๊ณ ๋ฆฌ์ฆ
- ์คํ๋ง ๋ฐ์ดํฐ jpa
- leetcode
- ์คํ๋ง ๋ถํธ jwt
- gRPC
- r
- leetcode binary search
- spring boot application
- Java
- intellij
- spring boot app
- ์คํ๋ง ๋ถํธ ์น ์ ํ๋ฆฌ์ผ์ด์
- Spring Data JPA
- JPA
- spring boot jwt
- Spring Boot Tutorial
- leetcode stack
- proto3
- ๋๋ฉ์ธ ์ค๊ณ
- leetcode bst
- ์คํ๋ง ๋ถํธ ํํ ๋ฆฌ์ผ