+ 1
what is double pointer
Why we have to pass double pointer in linked lists...what is advantage of that? What will happen if we didn't use double pointer. Plz explain with example if possible
5 Answers
+ 3
https://code.sololearn.com/c6ckq8konlB9/
An example if you need one
+ 1
By double pointer, do you mean pointer to pointer, or pointer to double?
+ 1
The idea is that a linked list can grow and shrink. Each node is a struct that contains a pointer to the next struct
+ 1
Tnx guys :)
so finally, its like ....if we use single pointer, it is similar to copying a pointer which doesn't affect changes in calling function
0
yes...its pointer to pointer..many standard books are using double pointer in linked lists