From a3b2f4d17e24b169f3e47650284af1580662d0e0 Mon Sep 17 00:00:00 2001 From: Mann Mehta <44433995+mann2108@users.noreply.github.com> Date: Fri, 17 Apr 2020 23:35:39 +0530 Subject: [PATCH] Fixed presentation error around brackets --- dynamic_programming/tree_height.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dynamic_programming/tree_height.cpp b/dynamic_programming/tree_height.cpp index fb3025039..1207d89a6 100644 --- a/dynamic_programming/tree_height.cpp +++ b/dynamic_programming/tree_height.cpp @@ -25,7 +25,7 @@ std::vector dp; void dp_with_dfs(int u) { visited[u] = true; int child_height = 1; - for (int v : adj[u]) { + for(int v : adj[u]) { if (!visited[v]) { dp_with_dfs(v); @@ -43,7 +43,7 @@ int main() { std::cin >> n; int u, v; /// Tree contains exactly n-1 edges where n denotes the nodes. - for (int i=0; i < n-1; i++) { + for(int i=0; i < n-1; i++) { std::cin >> u >> v; /// undirected tree u -> v and v -> u. adj[u].push_back(v);