generated from lambda-feedback/evaluation-function-boilerplate-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Implement algorithms to detect cycles, find all cycles, detect negative cycles, and compute graph girth (shortest cycle length).
Tasks
- Implement basic cycle detection using DFS
- Implement negative cycle detection (Bellman-Ford)
- Implement shortest cycle finder (girth)
- Add option to find all cycles (with size limits)
- Handle directed and undirected graphs
- Write unit tests for various cycle scenarios
- Add performance optimizations for large graphs
Acceptance Criteria
- Cycle detection works for both directed and undirected graphs
- Negative cycles are correctly identified in weighted graphs
- Girth computation works for graphs with cycles
- All cycles can be found for small graphs (<15 nodes)
- Proper handling of acyclic graphs
Metadata
Metadata
Assignees
Labels
No labels