Skip to main content

๐ŸŽฎ Graph Theory (Practice)

Companion to the Graph Theory guide. Build an adjacency list and detect a cycle in a directed graph. Edit and run the code right here โ€” it executes in your browser.

๐Ÿ Your turnโ€‹

Loading editorโ€ฆ

๐Ÿง  Challenge yourselfโ€‹

  1. Return a topological order when there is no cycle.
  2. Count connected components in an undirected graph.
  3. Adjacency list vs matrix โ€” when is each better?

Continue the learning path โ†’ Shortest Path