LeetCode 442 Find All Duplicates in an Array - Time O(N) and Space O(1) Solution

preview_player
Показать описание
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

Рекомендации по теме