From 8ecbb3c4adb1b1285d04ebea390a8a545dda1c7b Mon Sep 17 00:00:00 2001 From: kkxiaojun <985531883@qq.com> Date: Fri, 22 Feb 2019 15:53:11 +0800 Subject: [PATCH 1/2] Update 7.heapSort.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 建议修改下第一步的说明 --- 7.heapSort.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/7.heapSort.md b/7.heapSort.md index 35b24ec..158e37a 100644 --- a/7.heapSort.md +++ b/7.heapSort.md @@ -10,7 +10,7 @@ ## 1. 算法步骤 -1. 创建一个堆 H[0……n-1]; +1. 将待排序序列构建成一个H[0……n-1],根据(升序降序需求)选择大顶堆或小顶堆; 2. 把堆首(最大值)和堆尾互换; @@ -254,4 +254,4 @@ function heapSort($arr) { } return $arr; } -``` \ No newline at end of file +``` From 5f8c2abe727e426b78979e11848f067a022ac932 Mon Sep 17 00:00:00 2001 From: kkxiaojun <985531883@qq.com> Date: Fri, 22 Feb 2019 16:03:54 +0800 Subject: [PATCH 2/2] Update 7.heapSort.md --- 7.heapSort.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7.heapSort.md b/7.heapSort.md index 158e37a..394d929 100644 --- a/7.heapSort.md +++ b/7.heapSort.md @@ -10,7 +10,7 @@ ## 1. 算法步骤 -1. 将待排序序列构建成一个H[0……n-1],根据(升序降序需求)选择大顶堆或小顶堆; +1. 将待排序序列构建成一个堆 H[0……n-1],根据(升序降序需求)选择大顶堆或小顶堆; 2. 把堆首(最大值)和堆尾互换;