import { Graph } from '../graph/graph'; import { CycleInfo } from '../types/algorithm-results'; import { InvalidInputError } from '../types/errors'; import { Edge, Node } from '../types/graph'; import { Option } from '../types/option'; import { Result } from '../types/result'; /** * Detect cycles in a graph using DFS. * * For directed graphs: detects back edges (edges to ancestors in DFS tree) * For undirected graphs: detects any edge except parent edge * * Time Complexity: O(V + E) * Space Complexity: O(V) * @param graph - The graph to check for cycles * @returns Result containing Option with cycle info if found */ export declare const detectCycle: (graph: Graph) => Result>, InvalidInputError>; //# sourceMappingURL=cycle-detection.d.ts.map