When working with Graph Algorithms, it seems most of the solutions are given in terms of the adjacency list or the adjacency matrix representation of graphs.
However, I see most of the problems in leetcode are provided as an edge list. Since most of the solutions are given not using an edge list is it a good idea to convert the edge list to an adjacency list or the adjacency matrix? Is it recommended to solve all the problems using edge lists? Following are some of the basic Graph related problems:
- Cycle check in Graph
- Find path between two nodes in a Graph
- Find shortest path between two nodes in a Graph