Breadth First Search
May 05, 2019
How does it work?Take a node:Add each adjacent to a queuegoing through the queue, visit, add each of the neighbors to queue
Read moreMay 05, 2019
How does it work?Take a node:Add each adjacent to a queuegoing through the queue, visit, add each of the neighbors to queue
Read moreMay 05, 2019
What's the deal with BST?Node definitionIn Order Tree WalkFinding successorYou want to find the successor! The next value in the tree!If the…
Read moreMay 05, 2019
How does it work?Recursively go through graph, backtracking as necessary
Read moreApril 22, 2019
Minimum spanning trees are all about finding the shortest paths between things in a weighted graph. You want to:Touch every vertexHave the…
Read moreApril 17, 2019
Graphs! We keep them in memory either as an adjacency list or an adjacency matrix. The implication here is that we care about the things…
Read moreApril 08, 2019
Greedy algorithms follow a simple pattern: Choose the best of all immediate choices, that gives you the most immediate benefit, and you'll…
Read moreApril 08, 2019
Variable length encoding! How do we do it?You gotta know when you're teminating! In this case, think of it kinda as start and stop bits…
Read moreApril 01, 2019
Four stepsCharacterize the structure of an optimal solution.Recursively define the value of an optimal solution.Compute the value of an…
Read moreApril 01, 2019
For simplicity, lets assume all searches are successfulSearch cost of a key ki in BST T is 1 + sum(i=1 to n) depthT(ki)*pi, where p_i is the…
Read moreMarch 31, 2019
I listened to a bit of a lecture on Extreme Programming. It really re-enforced how important TDD and writing unit tests can be. I went and…
Read more