Given a Directed Acyclic Graph (DAG) represented as a list of directed edges, where each edge is a pair of strings indicating a connection from one node to another, determine the longest path in the graph. The output should be a list of node names representing the sequence of nodes along the longest path from the starting node to the ending node.
Constraints:
- The input graph is a DAG (no cycles).
- The number of edges is in the range [0, 104].
- Node names are represented as uppercase strings with length between 1 and 5.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected