Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ addOneRow
Method
addOneRow
Trees/addOneRowToTree.cpp:133–141 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
131
return;
132
}
133
TreeNode* addOneRow(TreeNode* root, int val, int depth) {
134
if(depth==1){
135
TreeNode *temp=new TreeNode(val);
136
temp->left=root;
137
return temp;
138
}
139
dfs(root,val,depth,1);
140
return root;
141
}
142
};
143
Callers
nothing calls this directly
Calls
1
dfs
Function · 0.70
Tested by
no test coverage detected