This Jupyter Notebook is a complete tutorial on fundamental graph and tree algorithms using Python. It's designed for learners aiming to build strong foundations in graph theory with practical code examples and visual understanding.
- Degree of Vertices β Calculate degree of each node.
- Graph Representation Conversion
- Adjacency Matrix β Adjacency List β Edge List
- Adjacency Check β Check if two vertices are adjacent.
- Completeness Check β Is the graph complete?
- Connectivity Check β Is the graph connected?
- Walk / Trail / Path Checker β Validate sequences as walk, trail, or path.
- Tree Detection β Check if a graph is a tree.
- Spanning Tree Extraction β Generate a spanning tree.
- Leaf Node Count β Count number of leaf nodes in a tree.
- Binary Tree Check β Determine if a tree is binary.
- Tree Height β Compute height of a tree.
- Node Depth β Find depth of a specific node.