NSArray * array = @[@"1",@"4",@"5",@"7",@"2",@"9"];
NSMutableArray * arr2 = [[NSMutableArray alloc]initWithArray:array];
for (int i = 0; i<[arr2 count]-1; i++) {
for (int j = i+1; j<[arr2 count]; j++) {
if(([arr2[i] intValue])>([arr2[j] intValue])){
NSString * str = arr2[i];
arr2[i] = arr2[j];
arr2[j] = str;
}
}
}
NSLog(@"%@",arr2);