# Algorithms_in_C++: data_structures/binaryheap.cpp File Reference

Loading...
Searching...
No Matches
binaryheap.cpp File Reference

A C++ program to demonstrate common Binary Heap Operations. More...

`#include <climits>`
`#include <iostream>`
`#include <utility>`
Include dependency graph for binaryheap.cpp:

## Classes

class | MinHeap

## Functions

int | main ()

## Detailed Description

A C++ program to demonstrate common Binary Heap Operations.

## Function Documentation

## main()

int main | ( | void |  | ) |

{
MinHeap h(11);
h.insertKey(3);
h.insertKey(2);
h.deleteKey(1);
h.insertKey(15);
h.insertKey(5);
h.insertKey(4);
h.insertKey(45);
std::cout << h.extractMin() << " ";
std::cout << h.getMin() << " ";
h.decreaseKey(2, 1);
std::cout << h.getMin();
return 0;
}
std::cout
MinHeap
Definition: binaryheap.cpp:10
h
int h(int key)
Definition: hash_search.cpp:45