feat: construct a directed graph, Time: O(N^3), Space: O(N^2)
feat: construct a directed graph, Time: O(N^3), Space: O(N^2)

wittyResry/topcoder,wittyResry/topcoder,wittyResry/topcoder,wittyResry/topcoder