Remove Duplicates

Arrays ยท medium

Implement `removeDuplicates(arr)` that returns a new array with duplicate values removed, preserving the original order.

Hints
  • A Set automatically discards duplicate values.

Learning resources

Loading...

Run your code to see results.