@?fundementals-of-algorithms

What is a tree?? A connected, undirected graph with no cycles. What is a binary tree?? A rooted tree where each node has at most two children. What type of data type is a tree?? An Abstract Data Type. What three terms are used for both actual trees and computer science trees?? Root, branches and leaves. What is the definition of the root of a tree?? The only node that doesn’t have a parent node.
2020-11-06
3 min read
In summary, what is a graph?? An abstract data type representing complex relationships. What is an undirected graph?? A graph where the edges don’t specify a direction. What does an edge represent in a graph?? A relationship between two nodes. What is an edge weight?? A numerical value associated with an edge. What does an edge weight commonly represent on a graph representing a map?? The distances between two places. What is a directed graph?? A graph where relationships can point one way only.
2020-11-05
2 min read