七种排序算法Java版(7)

2021-01-20 23:04

七种排序算法Java版,最常用的7种

maxIndex = right; } if (currentIndex == maxIndex) { isHeap = true; } else { int temp = array[currentIndex]; array[currentIndex] = array[maxIndex];

array[maxIndex] = temp;

currentIndex = maxIndex;

right = currentIndex * 2 + 2;

left = currentIndex * 2 + 1;

}

}

}

public static void main(String[] args) {

int data[] = { 2, -1, 5, 4, 6, 8, 7, -3 };

Sort.displayData(data);

Sort.bubbleSort(data);

Sort.displayData(data);

}

}


七种排序算法Java版(7).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:磁盘坏道工具PC3000使用方法详细图解

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: