//冒泡排序
-(NSArray*)Bubble_Sort:(NSArray*)oldArray
{
NSMutableArray * newArray = [NSMutableArray arrayWithArray: oldArray];
NSInteger num = [oldArray count];
for(int i = 0 ; i < num-1 ; i++)
{
for(int j = i +1; j < num ; j++)
{
int num1 = [[oldArray objectAtIndex: i] time];
int num2 = [[oldArray objectAtIndex: j] time];
if(num1 < num2)
{
// [newArray replaceObjectAtIndex: i withObject:[oldArray objectAtIndex: j]];
// [newArray replaceObjectAtIndex: j withObject:[oldArray objectAtIndex: i]];
[newArray exchangeObjectAtIndex:i withObjectAtIndex:j];
}
}
}
return newArray;
}