Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. // main function to do heap sort
  2. void build_max_heap(vector<int> A, int n) {
  3. // Build heap (rearrange array)
  4. for(int i = ((n)/2); i >= 1; i--) {
  5. max_heapify(A, i , n);
  6. }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement