r/learnprogramming • • Apr 05 '22

Name one programming/comp sci concept you never understood and if you understand it, try to explain it to them

Name a programming concept such as virtual functions, pointers, certain algorithms, etc that you always had a hard time understanding and why.

Someone else who reads yours and does understand it, try to explain it to them to help them learn

1.6k Upvotes

738 comments sorted by

View all comments

7

u/SwishArmyKnife Apr 05 '22

Linked lists have been one thing I can’t grasp. One, I don’t think I understand why sequential traversal would be preferred over sequential access. Two, the code for navigating to each new one just doesn’t make sense to me. I feel like I end up looking at it like every 2 months and nothing new sticks or clicks.

0

u/[deleted] Apr 05 '22

[deleted]

1

u/SwishArmyKnife Apr 05 '22

The movie row analogy really makes it make sense. So, if the memory doesn’t necessarily need to be continuous, is there anything that needs to be continuous in relation to node links for the computer to know where the next data point is?

0

u/[deleted] Apr 05 '22

[deleted]

2

u/SwishArmyKnife Apr 05 '22

That makes so much more sense than…whatever I thought was happening. I’m gonna take another look at it and see if I understand it this time. Thanks so much!

→ More replies (1)