Course Schedule Can Finish
Given numCourses and prerequisites, return whether all courses can be finished without cyclic dependencies.
Alien Dictionary Order
Given a sorted list of words in an alien language, derive the order of its unique letters.
Topological Sort via DFS
Return a deterministic topological ordering of nodes in a directed acyclic graph using DFS, or an empty list if a cycle exists.
Course Schedule Ordering
Determine a valid sequence to complete all courses respecting prerequisite constraints.
Minimum Height Trees
Given an undirected tree, find all root nodes that minimize the height of the tree.
Showing 1–5 of 5 challenges · Graphs & Graph Algorithms
Graphs & Graph Algorithms — Python coding challenges
What you will find here
This page lists graphs & graph algorithms challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.
Challenges vs tutorials and quizzes
Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.