-2

For example I have an array = [12,13,13,13,14,15,16,16,17];

and my output will be 12,13,14,15,16,17.

Please help me on this.

Bharath
  • 190
  • 7

1 Answers1

0

You can use NSSet instead, it doesn't allow duplicates.

Jordan Davies
  • 9,925
  • 6
  • 40
  • 51