RosettaCodeData/Task/Sort-an-integer-array/Objective-C/sort-an-integer-array.m

3 lines
110 B
Objective-C

NSArray *nums = @[@2, @4, @3, @1, @2];
NSArray *sorted = [nums sortedArrayUsingSelector:@selector(compare:)];