MCPcopy Index your code
hub / github.com/neetcode-gh/leetcode / dfs

Function dfs

javascript/0199-binary-tree-right-side-view.js:49–54  ·  view source on GitHub ↗
(root, level, rightSide)

Source from the content-addressed store, hash-verified

47};
48
49const dfs = (root, level, rightSide) => {
50 if (root.right) rightSideView(root.right, level + 1, rightSide);
51 if (root.left) rightSideView(root.left, level + 1, rightSide);
52
53 return rightSide;
54};

Callers 1

rightSideViewFunction · 0.70

Calls 1

rightSideViewFunction · 0.70

Tested by

no test coverage detected