mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-11 14:36:25 +08:00
Update dynamic_programming/tree_height.cpp
Co-Authored-By: Christian Clauss <cclauss@me.com>
This commit is contained in:
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user