일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 30. Substring with Concatenation of All Words
- Convert Sorted List to Binary Search Tree
- Substring with Concatenation of All Words
- 운영체제
- 315. Count of Smaller Numbers After Self
- Python
- Python Implementation
- concurrency
- 밴픽
- iterator
- 715. Range Module
- attribute
- Protocol
- 파이썬
- data science
- Generator
- Regular Expression
- 프로그래머스
- 109. Convert Sorted List to Binary Search Tree
- 시바견
- LeetCode
- kaggle
- shiba
- 컴퓨터의 구조
- Class
- t1
- 43. Multiply Strings
- Python Code
- DWG
- Decorator
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 |