My code is not working correctly. i am not able to find the proper logic to make it right


please correct the code.

Please mention the question name.

the question is print k th level nodes and after every level there should be a new line. i am trying the pair approach