4. Suppose we have an array A containing 9 integers: 240, 119, 682, 341, 225, 556, 122, 661, 245, i.e. A = [240, 119, 682, 341, 225, 556, 122, 661, 245] with the first index being 0. Please convert the array A into a maxheap and show the content of A after conversion. Note that the conversion should be done in-place.

詳解 (共 1 筆)

任祖頤
任祖頤
詳解 #5334382
2022/02/09
兩種解法 top-down, botto...

(共 219 字,隱藏中)
前往觀看