Find sum at level k

Is the question incomplete or what?
I’m not able to understand how the tree is being build. what is buildtree() function?

buildtree fn make the tree

Ohh, I confused it with Binary tree.