Skip to content

Files

Latest commit

3c76768 · Jul 23, 2023

History

History
This branch is 2 commits ahead of, 16 commits behind igorwojda/kotlin-coding-challenges:main.

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 23, 2023
Jul 23, 2023
Jul 23, 2023

Tree level width

Nice to solve before

Tree traversal

Instructions

Given the root node of a tree, return a list where each element is the width of the tree at each level.

Challenge | Solution

Examples

    A
  / |  \
B   C   D
|       |
E       F

Answer: [1, 3, 2]