[Mac OS development] use gcd to quickly sort the array, and use gcd multithreading to find the maximum value in the array
Function of this example: use gcd to sort an array with 40000 numbers, and the numbers in the array are randomly generated
The generated array code is as follows
_numsMutableArray = [[NSMutableArray alloc] init];
for (int i = 0; i < 40000; i++) {
NSNumber *temp = [NSNumber numberWithInt:arc4random_uniform(1000000)];
...
Added by k.soule on Fri, 11 Feb 2022 17:44:45 +0200