leetle

Daily challenge for 2025-03-10

69. Find All Duplicates in an Array

Write a function solve that finds all integers that appear exactly twice in an array where each integer is in the range [1, n] (inclusive) where n is the size of the array. Return the list of duplicates in ascending order.

Example:
Input: [4,3,2,7,8,2,3,1]
Output: [2,3]

Run this challenge interactively in Python or JavaScript when the app loads.