| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 43. Multiply Strings
- concurrency
- Substring with Concatenation of All Words
- 715. Range Module
- Convert Sorted List to Binary Search Tree
- data science
- Regular Expression
- Python
- attribute
- 프로그래머스
- kaggle
- 컴퓨터의 구조
- 시바견
- Decorator
- 30. Substring with Concatenation of All Words
- 109. Convert Sorted List to Binary Search Tree
- Python Implementation
- 밴픽
- shiba
- 파이썬
- Class
- 운영체제
- 315. Count of Smaller Numbers After Self
- Protocol
- DWG
- LeetCode
- t1
- iterator
- Python Code
- Generator
Archives
- Today
- Total
Scribbling
[Java 101] 217. Contains Duplicate with HashSet, Arrays.stream 본문
Computer Science/Java
[Java 101] 217. Contains Duplicate with HashSet, Arrays.stream
focalpoint 2023. 2. 14. 02:38class Solution {
public boolean containsDuplicate(int[] nums) {
Set<Integer> numSet = new HashSet<>(
Arrays.stream(nums).boxed().collect(Collectors.toSet())
);
return nums.length != numSet.size();
}
}'Computer Science > Java' 카테고리의 다른 글
| [Java 101] 1. Two Sum with HashMap as a counter (0) | 2023.02.14 |
|---|---|
| [Java 101] 242. Valid Anagram with HashMap (0) | 2023.02.14 |
| [Java 101] LeetCode: 2. Add Two Numbers (0) | 2023.02.14 |
| [Java 101] LeetCode: 15. 3Sum with 2D List (0) | 2023.02.14 |
| [Java Basics2] 이것이 JAVA다 내용 정리 (0) | 2023.02.13 |