Trees -- Find sum at level Kth level

input format is not explained properly?
how am i able to solve problem if i dont understand the input format

@archit_18
The input in this question is taken as a generic tree .
It takes the data of the node and the number of children it has .

class node{ //Generic_Tree node structure
int data ;
int noofchildren;
node* childArr;
node(int d,int n)
{ data = d;
noofchildren = n;
childArr = new node[n]; //This creates an array of Node* pointers dynamically
}
};

Ask for the data and no of children in BuildTree()
If no of children = 0 ; then that node is leave node
take for loop for input data recursively for each child node
for eg. in this case
data of root node = 1 , having two children
2 node also has two children

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.