Graph contains nodes and edges without following any rule.Whereas tree is a type of graph which must follow some rules.
2 popular methods are BFS(breath first search),DFS(depth first search).
If you could get any help from the answer then plz increase my trust point.
Chat with our AI personalities