반응형
Recent Posts
Notice
Recent Comments
Link
250x250
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 우선순위 큐
- ArrayList
- 깊이우선탐색
- 재귀함수
- 브루트포스
- DP
- dfs
- programmers
- Array
- hashset
- priority queue
- Algorithm
- 부분배열
- binary tree
- greedy
- Java
- recursion
- leetcode
- PCCP
- string
- 알고리즘
- coding
- two pointers
- HashMap
- 리트코드
Archives
- Today
- Total
목록Java (56)
지식창고
[Java]LeetCode 817. Linked List Components
LeetCode 817. Linked List Components - Java 문제 : Linked List를 주고 그 Linked List의 subset을 준다. 주어진 Linked List를 기준으로 subset List가 순서대로 이어진 그룹이 몇 개인지 센다. Input: head = [0,1,2,3], nums = [0,1,3] Output: 2 Explanation: 0 and 1 are connected, so [0, 1] and [3] are the two connected components. [0, 1] , [3] -> 2 HashSet 생성 HashSet의 특징 : 중복을 허용하지 않는다. Set set = new HashSet(); nums를 HashSet에 추가한다. for(int..
Algorithm/Leetcode
2022. 12. 24. 21:41