RosettaCodeData/Task/Remove-duplicate-elements/C-sharp/remove-duplicate-elements-2.cs

3 lines
75 B
C#
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
int[] nums = {1, 1, 2, 3, 4, 4};
int[] unique = nums.Distinct().ToArray();