4 ms·
How else would they learn about linked lists and dynamic arrays?
by MikeLui 8y ago
How else would they learn about linked lists and dynamic arrays?
- MichaelMoser123 8y agodepends on the course, if its a data structure course then its fine to do the linked list and dynamic array, but forcing your students to do them again and again in later courses will not make them very productive, they also might not enjoy the experience too much. This could happen for example if the data structure course was in python or java and later courses are in C. Also you can do the darn list in many ways: single linked list, double, ring, with counter/without counter. All very important in this day and age when you should know to avoid them altogether because linked lists fucks up cache behavior.
- MikeLui 8y agoFunny you mention that: the data structures course I took let us use any language we wanted. I chose python because I thought “hey python’s easier than C!” So I started making some tree implementation from scratch, and I kept having problems because I didn’t understand Python’s name binding system at the time, because I had no mental model of pointers or references or objects really. (Of course it was a shallowcopy/deepcopy issue). The next assignment I did in C and it was much more natural. Only later did I realize how meta and absurd it was to build custom dictionaries out of python primitives.
- MichaelMoser123 8y agoa dictionary in python where everything is a dictionary. That's what undergraduate courses are made for!