Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // main function to do heap sort
- void build_max_heap(vector<int> A, int n) {
- // Build heap (rearrange array)
- for(int i = ((n)/2); i >= 1; i--) {
- max_heapify(A, i , n);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement