Learn · Programming Abstractions

Lecture 25 of 27Lecture 2551 min

Lexicon Case Study, Lexicon as Sorted Vector, Lexicon as BST, Lexicon as Hash Table, Summary so Far, Noticing Patterns/repetitions in the Words, Letter Trie, Lexicon as Trie, Dynamic Array of Children, Flatten Tree into Array, Exploiting…

Julie Zelenski · Stanford University

At Stanford Engineering Everywhere Transcript

Credits and licence

From
Programming Abstractions, Stanford University (at Stanford Engineering Everywhere)
Licence
CC BY-NC-SA 4.0, as Stanford Engineering Everywhere states it. Non-commercial use only.
Attribution
Stanford Engineering Everywhere, Stanford University. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, unless otherwise expressly indicated.
Who can watch
Tweens profiles and older. How courses are placed

All the lectures

  1. About the CS106 Series at Stanford, The CS106 Philosophy, Why take CS106B?, Logistics of the Course, Introducing C++ 43 min · Video
  2. Similarity between C++ & Java: - syntax - variable types - operators - control structures, Looking at an Example C++ code: - comment, #include Statements, Global Declarations (constant), Declaring a Function Prototype, The main()… 44 min · Video
  3. C++ Libraries - Standard Libraries, CS106 Libraries, CS106 random.h Library, C++ String Type, Operations on String Type, String Class' Member Functions, C++ string vs Java String, Live Example Code : Working on Strings, CS106 strutils.h… 45 min · Video
  4. C++ Console I/O, C++ File I/O, Stream Operations, Live Example Coding : Working with Files, Live Coding Continuation: Function to Operate on the Opened File Stream, Passing the File Stream by Reference, Error Function, Class Libraries OO… 50 min · Video
  5. Client Use of Templates, Vector Class, Vector Client Interface, Client Use of Vector, Type-safety in Templates, Grid Class, Grid Client Interface, Client Use of Grid, Stack Class, Stack Client Interface, Queue Class, Queue Client… 46 min · Video
  6. More Containers, Map Class, Uses of Map, Map Client Interface, Live Coding Example: Use of Map, More information on Maps, What’s Missing? Iterator Operation Through the Map, Iterating Over the Map, Set Class, Set Client Interface, Live… 43 min · Video
  7. Seeing Functions as Data: Specific Plot Functions, Generic Plot Function, Back to the Set, Live Coding Example: Use of Set with User Defined Data Types, Client Callback Function, Review of the Classes Seen,5 Using Nested ADTs (Abstract… 48 min · Video
  8. Common Mistakes Stumbled Upon: 'I'terator, Common Mistakes Stumbled Upon: Concatenating Strings, Solving Problems Recursively, Functional Recursion, Example of Recursion: Calculating Raise to Power, Demo of "Raise to the Power Example"… 43 min · Video
  9. Thinking Recursively, Procedural vs Functional – Recursion, Fractal Code, Live Demo: Fractal Example, Another Recursive Graphic: Mondrian Art, Random Pseudo-Mondrian and the Code, Hanois Towers : Classic Recursion Example, Tower Code,… 48 min · Video
  10. Refresh: Permute Code, Tree of Recursive Calls, Live Demo: Testing with Different Cases, Eliminating Duplicates, Subsets, Subset Strategy, Subset Code, Tree of RecursiveCalls: Subset, Exhaustive Recursion, Recursive Backtracking, Turning… 47 min · Video
  11. Backtracking Pseudocode, Sudoku Solver, Sudoku Code, Cryptarithmetic, Dumb Solver, Smarter Solver, Looking for Patterns, Introduction to Pointers, Single Pointer Operations 48 min · Video
  12. Pointer Movie, Pointer Operations: Code & Pointer Memory Diagrams, Pointer Basics, Pointer and Dynamic Arrays, Use of Pointers, Recursive Data, A Recursive Structure, Live Demo: Working with Linked List, Building the List 42 min · Video
  13. Coding with Linked List, Printing the List, Using Recursion to Print List, De-allocating the Memory Used for the Linked List, Watch the Pointers: Prepend Function, Passing Pointers by Reference, Array vs Linked List, Insert in Sorted… 52 min · Video
  14. Algorithm Analysis, Evaluating the Performance, Analysis of Codes: Statement Counts, Another Example (Statement Count Contd.), Comparing Algorithm, Big-O Notation, Big-O to Predict the Time of Execution, Best/Worst/Average Case, Analysis… 50 min · Video
  15. Selection Sort, Live Demo: Working/execution of the Code, Selection Sort Analysis, Insertion Sort Algorithm, Live Demo: Working/execution of Insertion Sort, Insertion Sort Analysis, Insertion vs Selection, Quadratic Growth of the… 47 min · Video
  16. Partitioning for Quicksort, Quicksort Code Working/execution, Quicksort Code, Live Demo: Running Quicksort vs Merge Sort, Bad Split Example, Worst Case Split, What Input has Worst Case for Quick Sort, Live Demo: Running Quicksort vs Merge… 48 min · Video
  17. Sort Template with Callback, Supplying the Callback Function, One Last Convenience: Default Callback Function, Why Object Oriented Programming, Class Division, Class Interface in ".h" File, Storage for Objects, Accessing Members of a… 45 min · Video
  18. Abstract Data Types, Wall of Abstraction, Why ADTs?, Live Coding Example: Creating the Vector Class, Private Data Members, Growing Dynamically: Making Space at Runtime, Insert and Remove Functions, Templatizing the Class Created,… 51 min · Video
  19. Rules of Template Implementation, Explanation of the Working, Not Allow Member Wise Copy, InsertAt Function, Consequences of Contiguous Memory Being a Disadvantage, Stack Class, The Member Function Definitions, Midterm Post Mortem 41 min · Video
  20. Live Coding: Recap of the Vector-based Implementation for Stack, Linked List Implementation for Stack, Live Coding: Linked List Implementation for Stack, Analyzing Push/pop Functions, Queue Implementation, Live Coding: Queue… 51 min · Video
  21. Buffer: Vector vs Stack, Buffer as Linked List, Cursor Design, Use of Dummy Cell, Linked List Insert/delete, Linked List Cursor Movement, Compare Implementation, Doubly Linked List, Compare Implementation, Space Time Trade Off,… 46 min · Video
  22. Map as Vector, A different Strategy: Binary Search Tree, Trees in General, Binary Search Tree for Numbers, Operating on Trees, Tree Traversals at Work, Implementing Map as Tree, Map - getValue(), Important Syntactical Advice, Adding to a… 50 min · Video
  23. Pathfinder Demo, Graphs: Examples, Graphs: Explanation, Implementation Strategies, Graph Representation in C++, Nodes and Arcs in C++, Graph Traversals, DFS - (Depth First Search), Trace DfS, BFS - (Breadth First Search), Trace BFS, Graph… Video
  24. Compare Map Implementations, Hashtable Idea, Hash Functions, Hash Collisions, Live Demo: Hashing, Live Coding: Hashing, Hashing Idea : Example in Real World, Hash Table Performance, Compare Map Implementations, Hashing Generic Types,… 50 min · Video
  25. Lexicon Case Study, Lexicon as Sorted Vector, Lexicon as BST, Lexicon as Hash Table, Summary so Far, Noticing Patterns/repetitions in the Words, Letter Trie, Lexicon as Trie, Dynamic Array of Children, Flatten Tree into Array, Exploiting… 51 min · Video
  26. Final Showdown, Thinking About Design, Runtime Performance, Memory Used, Code Complexity, Making Tradeoffs, Array vs Vector, Stack/Queue vs Vector, Set vs Sorted Vector, Pointer-based vs. Contiguous Memory, CS106B MVPs, Pointers, To… 49 min · Video
  27. Guest Lecturer: Keith Schwarz, About the C++ Language, Quick History of C++, C++ Philosophy, C++ Without genlib.h, A Working genlib.h Replacement, Other CS106 Headers, strutils.h, simpio.h, random.h, graphics.h/extrgraph.h, What about… 52 min · Video