In the constructor, it is mentioned that next=NULL, I want to know what is the logic behind that and what it does?
What does next=NULL do, in the class constructor?
hello @gargprachi1203
next =NULL is simply setting null to the next of current node.
we are doing this to avoid any garbage address access .