---- v1_introduction Data Structures: Follows on from CS211 C++, memory, etc. CS311 will also use C++ cout, objects, new, delete, etc. We'll mostly avoid private data members I do have CS211 videos online 4 different CS211 teachers might be represented here Online class: Testing Center requirement Weekly schedule: Content released Friday of the previous week Syllabus and Calendar ---- v2_pointer_review First: A review of C++ pointers We'll use them more than CS211 did Remembering CS253 could be helpful too They'll be used in CS430 and CS435 Memory areas: Heap vs. Stack allocation Picture on board Address range: Three variables from each Code segment also, to be complete We will be building data structures on the heap Why not the stack? Lifetime will not correlate with function calls Size will vary throughout the structure's lifetime A data structure contains a bunch of "normal" variables ---- v3_return_data_from_function A demo here: A function that concatenates two strings Yes, C++ does this But how? ---- v4_data_structure_intro Structuring data, philisophical note: A lot of organizational schemes have a real-world analogy Trees, etc Retrieval time is usually important Just like in normal life Kitchens, projects, dentists, etc. What do we really want out of a data structure? Quick retrieval Quick addition of new data Quick deletion of data that actually frees up space Quick search Efficient use of memory Parallel access from multiple threads Parallel modification from multiple threads Simple enumeration of items (in sorted order) Doesn't lose data Accesses normally result in a CPU cache hit Low use of CPU resources (battery life) We'll cover traditional staples of data organization More important is to learn to think through data organization There are good libraries for the structures we'll learn Sometimes a custom solution is better It might not be exactly any of what we've discussed in this class ---- v5_lab_1_equations Lab 1: A lot of people kinda freak out about the equation bit If you run into trouble, feel free to ask me Also: I teach a CS250 lab on Mondays at 3:00, feel free to drop in Pretty simple: Capital Sigma and capital Pi are both counting loops For capital Sigma, add all the terms up For capital Pi, multiply them Examples, in a math sense Example translating to code Computational Complexity related to n (and m in one case): How does the runtime scale increase as related to n? For each of the first four, it's one of these: Linear: double n, runtime will double Squared: Runtime is related to n squared Give it your best shot on 5