since we are just traversing through the list and not changing anything in the list why are we using reference pointer in getnode function
Reference pointer in getnode
Yes…since data is not being modified inside the function, it is not necessary to pass be reference. You can simply pass by value also.