AlgoScope

Multigraph

Data structureintermediateGraph Structures

Allows parallel edges and self-loops.

Decision · step 2 of 8Matrix: Multigraph: cells count edges, loops count twice
012301230100100000000000

Edge 0-1: cells (0, 1) and (1, 0) go from 0 to 1, the same as in a simple graph. 1 of 6 edges placed.

Open in the player →or start at step 2

What you will see

Parallel edges drawn as separate curves between the same vertices.

How matrix works →

Cost

add edgeO(1)
SpaceO(V + E)

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, try operations in any order.

Screen readers: Each element is an accessibility element with position, value and state; structural changes are announced per step.

Reduced motion: Elements appear at their destination with a crossfade; no travel longer than the element's own size.

Before this

Related

Taught by the same lesson

Matrix covers these too, in the same run.