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

3

u/LaChapelleAuxSaints Apr 05 '22

Dynamic Programming. It's simply storing values into memory, like cache? Idk, but the way it was taught was so convoluted I still have no idea what the matrices are for or about.

1

u/faceplanted Apr 05 '22

Matrices aren't necessarily involved at all, dynamic programming is about optimising recursion by finding part of a problem that are calculated over and over again and making sure you only do them once.

It lends itself to matrix problems because lots of matrix algebra involves repeating a lot of simple work which can be avoided.

1

u/LaChapelleAuxSaints Apr 06 '22

So that's how it is. The whole concept was totally lost on me that the case example (being matrices) given in classroom was my only takeaway. Thanks for clarifying!