This is a late blog for last week. I had been thinking really hard on LinkedList. Linked list consist of 2 parameters value and next. value is stored in this node and next refer to the next node. It was unclear for me that how does assigning node to next made them connected and later on I realized that I was assigning memory address to the next. The memory address made the whole thing smooth. I also did a=b on them and discovered that the what I changed on a changed b.
What I learned is that a=b assign the memory of a to b and that's how the thing works. By understanding memory made the whole thing make much more sense. so I need to get a copy of b to a.
No comments:
Post a Comment