摘要:
#include #include void heaplify(int *arr, int len, int pos){ int left = pos * 2 + 1; int right = pos * 2 + 2; int max = 0; int temp = 0; if( left arr[pos]) { max = left; } else { max = pos; } if( right arr[max]) { max = right; } if... 阅读全文