---
title: "Discussion on \"How Heap Works....\" | Hashnode"
description: "Discussion on \"How Heap Works....\". //A Heap is a special Tree-based data structure in which the tree is a complete binary tree.///\n/* C++ Function to sort an array using insertion sort*/\n#include <bits/stdc++.h>\nusing namespace std;\nvoid insertionSort(int A[], int size)\n{\nint i, key, ..."
url: "https://hashnode.com/posts/how-heap-works/645f5ed6349d4da099bf92c1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How Heap Works....](https://ayushagarwal100.hashnode.dev/how-heap-works?utm_source=hashnode&utm_medium=feed)

//A Heap is a special Tree-based data structure in which the tree is a complete binary tree./// /\* C++ Function to sort an array using insertion sort\*/ #include <bits/stdc++.h> using namespace std; void insertionSort(int A\[\], int size) { int i, key, ...

May 13, 2023 · 1 min read · ayushagarwal100.hashnode.dev  
Read the article

-   [#hashnode](https://hashnode.com/tag/hashnode)
-   [#heap](https://hashnode.com/tag/heap)
-   [#competitive-programming](https://hashnode.com/tag/competitive-programming)

## Written by

[AYUSH AGARWAL](https://hashnode.com/@AyushAgarwal199)

@AyushAgarwal199

  
[View profile](https://hashnode.com/@AyushAgarwal199)

AI Enthusiast Fast Learner

## Responses

Comments are turned off for this post.
