Arrays

Find All Duplicates

medium
Given an integer array `nums` of length n where all integers are in the range [1, n] and each integer appears once or twice, return an array of all the integers that appear twice. Order may vary.
Hint steps(0/1 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.