/*建议先看堆调整方法,堆调整了解了,整个排序算法就算掌握了*/-(void)viewDidLoad{[superviewDidLoad];/*测试数据*/NSArray*array=@[@3,@2,@6,@4,@1,@0,@6,@7,@5];NSMutableArray*mutable=[NSMutableArrayarrayWithArray:array];mutable=[selfcreateMaxHeap:mutable];NSIntegernum=mutable.count...
查看全文