Contains Duplicate - LeetCode 217 - Python Problem #2
Вставка
- Опубліковано 25 чер 2024
- Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.
Code: github.com/abhishekmshr956/Le...
LinkedIn: / abhishekmishraiitkgp
Twitter: / abhishek_iitkgp
0:00 Problem statement
1:10 O(n^2) brute force solution
4:38 O(nlogn) solution using sorting
9:41 O(n) hash set
Sir what is your profession?
Postdoctoral Scientist