What are Heaps?
Heaps are a really cool and convenient data structure in computer science. The way they work is by having a max value, or largest value in the structure. Each node (the objects within the heap) have two children, each of which are smaller than the node. These nodes have children, and so on and so forth. The only requirement is that the parent nodes are larger than the child nodes.
By having the data contained in heaps, you can do a lot of things, like a MinMax AI, or a graph, which you can analyze using graph theory. Graph theory is actually very cool, and very useful.
Graph theory essentially is determining the short path between nodes. In a graph, each node has a set of distances to other nodes. One famous thing to do is the traveling salesman example, which essentially has a merchant traveling from market to market using a series of bridges. However, each bridge has a different length.
The goal of traveling salesman is to determine how you can get from point A to point B in the minimum distance.
The best way to do this is using Dijkstra’s algorithm. Dijkstra’s algorithm is essentially just going from node to node, compiling all node that you can go from the new node you have just arrived at.