Regarding the doubt

why u have return newnode (d) in 21 line again ehy d have return

Hey @ssmit_joshi
I will call u in half n hr