What would be the Java code to detect a cycle for a directed graph given an adjacency-list style array of strings, it would return false if there is a cycle (details in the answer section below)?
valid question