Skip to content

Instantly share code, notes, and snippets.

#include <vector>
#include <iostream>
// Implementation of a priority queue using a binary heap where the
// binary heap is stored using a vector. The heap stores the minimal
// element at the top, which makes it a min-heap.
// This is sample class for the HiredInTech.com tutorials.
class PriorityQueue {
public:
PriorityQueue() {}
# Implementation of a priority queue using a binary heap where the
# binary heap is stored using a vector. The heap stores the minimal
# element at the top, which makes it a min-heap.
# This is sample class for the HiredInTech.com tutorials.
class PriorityQueue:
def __init__(self):
# We will use a `list` to store the heap values
self.heap = []
def get_size(self):
### Keybase proof
I hereby claim:
* I am antonrd on github.
* I am antondimitrov (https://keybase.io/antondimitrov) on keybase.
* I have a public key whose fingerprint is 8360 E4CC 4CEE CB61 D0F5 67CD D941 6A6E E469 5A47
To claim this, I am signing this object: