Given the root of a binary tree and a positive integer k, determine the
The level sum of a binary tree is defined as the sum of all node values present at the same level.
Return the k levels, return
Constraints:
The number of nodes in the tree is n.
n
Node.val
k n
Given the root of a binary tree and a positive integer k, determine the
The level sum of a binary tree is defined as the sum of all node values present at the same level.
Return the k levels, return
Constraints:
The number of nodes in the tree is n.
n
Node.val
k n