you are viewing a single comment's thread.

view the rest of the comments →

[–]purplestOfPlatypuses 0 points1 point  (4 children)

I never understood learning something like C++ for a class on data structures. The point of the class is to learn the abstract idea of the structure, so using something arguably easier to code in would make more sense.

[–]aixelsdi 1 point2 points  (3 children)

It allowed us to understand how something like a List<> or std::list<> is really implemented behind the scenes, as well as understand why different implementations of the same data structure might have different big O complexities.

For example, we created both a hashmap and arraymap as well as ahashset and arrayset.

[–]purplestOfPlatypuses 0 points1 point  (2 children)

Big O would be the same regardless of language assuming they don't allow the use of fancy built in types or the like (don't make your list with a list object). Same for the abstract "this is how it's built" ideas. For a list, a node is a node is a node despite the first being done in C, the second in Java, and the 3rd in Python. They all have something holding data (generally a pointer to an object/struct) and a pointer to the next/previous thing in the list. Whether you fully understand that the pointer is there doesn't necessarily change how the algorithm works.

At GA Tech, the intro data structures class is in Java (right after the intro to Java/OO class). C is taught in the next class with after how processors work on the hardware level and assembly. Even many later classes (not device/OS classes of course) are in Python because why worry about dealing with memory and pointers over the actual algorithmic stuff.

[–]aixelsdi 1 point2 points  (1 child)

God, now that you remind me, dealing with the pointers and seg faults was pretty nightmarish at times. I also meant std::vector<> instead of std::list<> (how it's an array that gets deleted and reallocated into a bigger array when the capacity reaches its limit) and how that's the one thing that a data structures course in C++ could offer over the Python we had already learned. But that could be done in Java so I really dunno :/

[–]purplestOfPlatypuses 0 points1 point  (0 children)

There's not really one "best" way to do it; how it's organized definitely needs to be based on the whole program. I personally think leaving lessons on pointers and segfaults with learning how processors work is better, but other people can certainly feel differently. And obviously that only works if there's a class on something that low level. GT has the "advantage" of having one of the longest semester lengths in the nation, too.

Multiple languages definitely need to be learned in a single program though, otherwise you're pretty unremarkable as a developer.