Find sum at level k

giving run time error

@vikashkmr519,
https://ide.codingblocks.com/s/167021 I have attached the correct code. Error was resolved by passing the original scanner class object into the generic tree class. Your code would’ve given correct answer on eclipse but on online IDEs you would’ve got run time error