Member-only story

Heap Data Structure in GoLang

Maneesha Indrachapa
7 min readJun 16, 2022

--

Hi, everyone today will be talking about Heaps. I watched a Youtube video about developing heaps using Go Lang and it was very interesting. We are trying to learn the basic concepts about heaps like inserting and extracting data from heaps and also the time complexity of heaps. finally will be developing a heap data structure from scratch using GoLang.

Heapsort

Heaps are a very interesting data structure, we think it is like a tree structure but actually, it is an array. So it is interesting to know how it works and how to implement one because it will be helpful in algorithms. The heap data structure was originally introduced as a part of the algorithm called heap sort but the data structure introduced there was also important for other applications such as priority queues, Selection algorithms, Graph Algorithms, etc. Heap sorts are great for implementing priority queues. Because in Normal queues we do FIFO — First, in first out but in Priority Queues, we need to serve the highest priority first.

Queue Serving

What is Heap?

--

--

Maneesha Indrachapa
Maneesha Indrachapa

Written by Maneesha Indrachapa

If you can dream it, you can do it.

Responses (2)