MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / dfs

Function dfs

javascript/0062-unique-paths.js:16–21  ·  view source on GitHub ↗
(row, col)

Source from the content-addressed store, hash-verified

14};
15
16var dfs = (row, col) => {
17 const left = uniquePaths(row - 1, col); /* Time O(2^N) | Space O(HEIGHT) */
18 const right = uniquePaths(row, col - 1); /* Time O(2^N) | Space O(HEIGHT) */
19
20 return left + right;
21};
22
23/**
24 * DP - Top Down

Callers 1

uniquePathsFunction · 0.70

Calls 1

uniquePathsFunction · 0.70

Tested by

no test coverage detected