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

Function dfs

javascript/0100-same-tree.js:36–41  ·  view source on GitHub ↗
(p, q)

Source from the content-addressed store, hash-verified

34 * @returns
35 */
36const dfs = (p, q) => {
37 const left = isSameTree(p.left, q.left);
38 const right = isSameTree(p.right, q.right);
39
40 return left && right;
41};
42
43/**
44 * https://leetcode.com/problems/same-tree/

Callers 1

isSameTreeFunction · 0.70

Calls 1

isSameTreeFunction · 0.70

Tested by

no test coverage detected