Find sum at level K

trying to make a tree.but getting errors.

Hey @RULEREMPIRES
You have sent the wrong link.
This code is written in c ++ and this code is the solution to a different question.

@RULEREMPIRES
You are doing it the wrong way.
Simple create generic tree

getting No such element Exception while building tree.All seems to be right.

@RULEREMPIRES
take Scanner static

If you have any doubt ask here Do not open new thread