

Each node is a structure and contains information like person id, name, gender, and locale. For example, in Facebook, each person is represented with a vertex(or node). Graphs are also used in social networks like linkedIn, Facebook. The networks may include paths in a city or telephone network or circuit network. Graphs are used to represent many real-life applications: Graphs are used to represent networks. The pair of the form (u, v) indicates that there is an edge from vertex u to vertex v. The pair is ordered because (u, v) is not the same as (v, u) in case of a directed graph(di-graph). A finite set of ordered pair of the form (u, v) called as edge. A finite set of vertices also called as nodes.Ģ. Kruskal’s Minimum Spanning Tree Algorithm | Greedy Algo-2Ī graph is a data structure that consists of the following two components:ġ.Prim’s Minimum Spanning Tree (MST) | Greedy Algo-5.Dijkstra's shortest path algorithm | Greedy Algo-7.

Construct Full Binary Tree from given preorder and postorder traversals.Construct a Binary Tree from Postorder and Inorder.Construct Tree from given Inorder and Preorder traversals.Print Postorder traversal from given Inorder and Preorder traversals.

Inorder Tree Traversal without recursion and without stack!.Inorder Tree Traversal without Recursion.Tree Traversals (Inorder, Preorder and Postorder).Breadth First Search or BFS for a Graph.Unique paths covering every non-obstacle block exactly once in a grid.Print all possible paths from top left to bottom right of a mXn matrix.Count all possible paths from top left to bottom right of a mXn matrix.Count number of ways to reach destination in a Maze.The Knight’s tour problem | Backtracking-1.Warnsdorff’s algorithm for Knight’s tour problem.Printing all solutions in N-Queen Problem.

