-
往兮空残梦
发布于 2021-11-19 15:50
-
收藏
var numWays = function(n, relation, k) {let ways = 0;const edges = new Array(n).fill(0).map(() => new Array());for (const [src, dst] of relation) {edges[src].push(dst);}const dfs = (index, steps) => {if (steps === k) {if (index ==..