I have a tree with data structure:
root: {
children:[
{children: [
{children:[]}
]},
{children: []}
]
}
Here is example of tree where the result should be 4(maximum width)
R
/ | \
A B X
/ \ / \
C D E F
\
G