标签:style blog class code c java
1 + (NSMutableArray *)randArray : (NSMutableArray *)arrayM 2 { 3 4 NSMutableArray *resultM = [[NSMutableArray alloc] initWithCapacity:arrayM.count]; 5 NSInteger count = arrayM.count; 6 for (NSInteger i = 0; i < count; i ++) 7 { 8 NSInteger index = arc4random_uniform((unsigned int)arrayM.count); 9 [resultM addObject:[arrayM objectAtIndex:index]]; 10 [arrayM removeObjectAtIndex:index]; 11 12 } 13 return resultM; 14 }
标签:style blog class code c java
原文地址:http://www.cnblogs.com/dashunzi/p/3732872.html