The problem is to finding a tree from a given graph.The main challenge is that the value of the node is not provided. So adjacency matrix can not be used to solve the problem. To define a tree for a directed graph : total edges = total vertices -1;root can not be more than one,

# Category: Linked List

## Archives

- April 2020 (1)
- August 2017 (6)
- July 2017 (10)
- February 2017 (1)
- October 2016 (1)
- September 2016 (3)
- August 2016 (41)
- June 2016 (2)
- April 2016 (10)
- March 2016 (10)
- February 2016 (4)
- January 2016 (3)
- December 2015 (15)
- November 2015 (11)
- October 2015 (15)
- September 2015 (13)
- August 2015 (9)
- July 2015 (35)
- June 2015 (3)
- May 2015 (8)
- April 2015 (11)
- March 2015 (14)
- February 2015 (17)
- January 2015 (21)
- December 2014 (10)
- November 2014 (28)
- October 2014 (13)
- September 2014 (22)
- August 2014 (22)
- July 2014 (10)
- June 2014 (5)
- May 2014 (1)

## Categories

- Ad Hoc (94)
- Algorithm (366)
- Array related Problems (12)
- Articulation Point (2)
- Backtrack (8)
- BellmanFord (1)
- Binary Search (5)
- Bipartite Matching (4)
- Catalan Number (1)
- Computational Geometry (2)
- Critical (9)
- Critical (7)
- Data Structure (17)
- DFS AND BFS (28)
- DFS FLOOD FILL (1)
- Dijkstra Algorithm (1)
- DP (5)
- DP (39)
- Factors (8)
- Fenwick Tree (4)
- Floyd warshall (15)
- GCD-LCM (2)
- Geometry (13)
- Graph Algorithm (55)
- Hash Table (1)
- Java (1)
- Kadane's Algorithm (5)
- KMP Algorithm (4)
- Linked List (1)
- LinkedList Related Problem (3)
- Math (58)
- MAX FLOW (1)
- Meet In the Middle (1)
- Merge Sort related Problem (1)
- Minimum Spanning Tree (1)
- NCPC 2016 (4)
- Notes (1)
- Number Theory (44)
- Pattern Search (6)
- Permutation (2)
- Practice Problems (51)
- Prime (12)
- Probability (1)
- Programming Problem (318)
- Puzzle Problem (4)
- Recursion (2)
- Scheduling (3)
- Segment Tree (2)
- Sort Algorithm & Problem (2)
- Sorting (1)
- Spiral Shape Problem (2)
- Stable Marriage Algorithm (1)
- String (11)
- Suffix Array + LCP (2)
- Tic Tac Toe (1)
- Tree (5)
- Trie (4)
- TSP (3)
- Tutorial (3)
- Union Find (2)