Generation

generate functionFri, 30 Dec 2022

Alice and the tree below Alice is an observant person. While flying to some other city, she notices a tree down below from her window. Later she goes to the same tree and tries to remember what it looked like. She is not able to visualize it and immediately asks for your help. Your task is to help Alice in finding how the binary tree looked from the top,

// // 50 50 // / / // 20 20 // / / // 30 30 // / \ \ // 10 40 40 // \ / // 20 20 // \ / // 30 30

Questions about programming?Chat with your personal AI assistant