Once you understand an example (say, a Stack implementation), try to break it. What happens if you try to pop from an empty stack? Does the code
Don't just copy-paste the code from the PDF. Write it out in a notebook. Draw the memory blocks. When the code says ptr = ptr->next; , physically draw an arrow moving to the next box. This "dry running" is how you build mental models of memory. data structures in c balaguruswamy pdf
The answer lies in the concept of foundational understanding . Once you understand an example (say, a Stack