public class CPM extends Object
This implementation uses AcyclicLP to find a longest
path in a DAG.
The running time is proportional to V + E,
where V is the number of jobs and E is the
number of precedence constraints.
For additional documentation, see Section 4.4 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args)
Reads the precedence constraints from standard input
and prints a feasible schedule to standard output.
|
public static void main(String[] args)
Copyright © 2025. All Rights Reserved.