Multigraph
Allows parallel edges and self-loops.
Decision · step 2 of 8Matrix: Multigraph: cells count edges, loops count twice
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.
What you will see
Parallel edges drawn as separate curves between the same vertices.
Cost
| add edge | O(1) |
|---|---|
| Space | O(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.