Report Each Binary-Tree Node's Level and Balance Status

Given the root of a binary tree, use DFS to report the following information for every node:

  1. The node value;
  2. Its depth level, where the root is at level 0;
  3. Whether the node is balanc...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: