Started by KK20, November 11, 2012, 05:53:22 pm
Quote from: Melol vectors...my 131 teacher refuses to let me use those. They looked easier to use than linked lists and such with pointers.
Quote from: Person A131 has a purpose, which is to teach you about the most common data structures and their strengths and weaknesses. Off the top of my head, I believe you can use vector to implement all of them, but letting you do it that way would defeat the purpose of the class. In the real world though, vector is pretty much the uber-structure, because it's stored as an array. If your CPU has a pipeline (and pretty much all of them do), then locality of reference* beats the lower time complexity** of the other structures for certain operations almost every time.* unless you do something stupid like make a vector of pointers, because then you're optimizing for cache misses.** That's actually not entirely true, since big-O is supposed to take the hardware architecture into consideration, but most most of the time we do it wrong.
Quote from: MeSo 131 is practically "Here's information that you will never have to use in your future careers"? Wow, no wonder I'm bored in that class.
Quote from: Person BYou will use everything in 131, over and over again.For job interviews, you will be expected to know everything which is taught in 131.
Quote from: winkioI do not speak to bricks, either as individuals or in wall form.
Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.
QuoteIt's actually quite simple to explain, especially since I had the same opinion back then.