Closest-pair problem/Objective-C: Difference between revisions
m
Fixed syntax highlighting.
m (modernize) |
m (Fixed syntax highlighting.) |
||
Line 4:
{{works with|Cocoa}}
<
#import <math.h>
Line 51:
else return NSOrderedSame;
}
@end</
<
+ (NSArray *)closestPairSimple: (NSArray *)pts;
+ (NSArray *)closestPair: (NSArray *)pts;
Line 138:
}
@end</
'''Testing'''
<
int main()
Line 165:
}
return EXIT_SUCCESS;
}</
Timing (with the <tt>time</tt> command):
|