Ayush7614 / Ayush7614/Daily-Coding-DS-ALGO-Practice

Tilt a binary tree

Open
#385 0 comments 0 reactions 1 assignee Claimed by @Debashish-hub View on GitHub
LGMSOC21 🟨 Level2
Dominant language
C++
Stars
323
Forks
472
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

Given the root of a binary tree, return the sum of every tree node's tilt.
The tilt of a tree node is the absolute difference between the sum of all left subtree node values and all right subtree node values. If a node does not have a left child, then the sum of the left subtree node values is treated as 0. The rule is similar if there the node does not have a right child.

**Describe the solution you'd like**
I will solve it in C++

### Programming language

- [ ] C
- [ ] C++
- [ ] Java
- [ ] Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.