filmov
tv
Find All Duplicates in an Array | LeetCode 442
![preview_player](https://i.ytimg.com/vi/G7_41JxZkW0/maxresdefault.jpg)
Показать описание
Given an integer array nums of length n where all the integers of nums are in the range [1, n] and each integer appears once or twice, return an array of all the integers that appears twice.
You must write an algorithm that runs in O(n) time and uses only constant extra space.
You must write an algorithm that runs in O(n) time and uses only constant extra space.