Update dynamic_programming/tree_height.cpp

Co-Authored-By: Christian Clauss <cclauss@me.com>
This commit is contained in:
Mann Mehta
2020-04-20 16:45:13 +05:30
committed by GitHub
parent f4c936d8be
commit 1ff60ebf20

View File

@@ -22,7 +22,7 @@ std::vector<int> adj[MAX];
std::vector<bool> visited;
std::vector<int> dp;
void dp_with_dfs(int u) {
void depth_first_search(int u) {
visited[u] = true;
int child_height = 1;
for (int v : adj[u]) {