This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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() {} |