Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c683199

Browse files
Undirected Graph using Adjacency List
1 parent 0685eb9 commit c683199

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'''
2+
An array/dictionary of lists is used. Size of the array/dictionary is equal to the number of vertices. Let the array be array[].
3+
An entry array[i] represents the list of vertices adjacent to the ith vertex. This representation can also be used to represent a weighted graph.
4+
The weights of edges can be represented as lists of pairs.
5+
6+
The Implementation will be same as Directed Graph, but this time the connection will be done both ways.
7+
If v1 => v2 then v2 => v1
8+
Or v1 <=> v2
9+
'''

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /