filmov
tv
LeetCode 442 Find All Duplicates in an Array - Time O(N) and Space O(1) Solution
![preview_player](https://i.ytimg.com/vi/ePNh0U-S1ck/maxresdefault.jpg)
Показать описание
Find All Duplicates in an Array is a medium level problem.
Time O(N)
Space O(1)
Dose :
Whenever there is O(N) time use only one for loop ( don't use nested for loop for one index)
When there is O(1) Space try to manipulate the array in place
#leetcode #interviewdose
Time O(N)
Space O(1)
Dose :
Whenever there is O(N) time use only one for loop ( don't use nested for loop for one index)
When there is O(1) Space try to manipulate the array in place
#leetcode #interviewdose