Basic data structures for undirected graphs with and without edge weights; DFS, BFS, Dijkstra