Course Notes, Practice Problems, and Solutions

Course Notes and Stuff         Extensive notes on just C++ language
Cone of Learning
Language and C++ Environment notes
Java vs. traditional architecture (e.g., C++) . . . C++ stack-heap memory model
Google's C++ Style Guide
Java Coding Style Conventions
342/343 bottom-line Style Guidelines

About pair programming   Pair programming video
Pair programming bottom line in CSS 342

Compiling/executing information
Getting started using MS Visual Studio (VS) 2019   . . .   Older versions
On a Mac, use Visual Studio Code (VSC)for writing your code. To compile and run your executable, open a Mac terminal window (independent of VSC). Watch this short youtube video for information on how to do this: Video
(You will want to keep your code in a folder, not on the desktop.)
VIDEO by me on using Linux   (Click right bottom corner arrow for full screen)
Expand the tabs to blanks in VS 2017
Basic Unix commands
How to transfer files and compile under linux
Valgrind of a correct program: Valgrind example
Valgrind shows errors and memory leak: How valgrind works

Basic C++ information
Explaining end-of-file I/O
Miscellaneous C++ notes
Pass by value vs. pass by reference   . . .   Parameter passing examples
Elementary sorting algorithms
When an object has dynamic memory

Pointers, STL, Complexity
Pointers and memory diagram from lecture . . . Another version
Memory Leak in industry
STL and iterators: big picture
Notes on the STL and iterators
Smart Pointers (handles garbage collection) . . . Overview
Growth of Functions   (introduction to complexity)
Big-O code examples

Recursion
Recursion
Hanoi puzzle code
Execution tree for Hanoi puzzle
Recursive sorting algorithms
Prefix/infix/postfix examples

Object-Oriented Programming (OOP) information
Simple Unified Modeling Language (UML)
For drawing UML, many students use draw.io. lucidchart.com is reported to be good too.
OOP design information
OOP design example   Design pseudocode
OOP design principles
High-level Bridge game design

Binary Search Tree
Binary Search Tree:   binary search tree insert  
Tree recursion:   Binary tree problem solving (recursion)

Queue and Stack Usage
Radix sort
Algorithm to convert infix to postfix
Show execution of infix to postfix algorithm
Algorithm to evaluate a postfix expression

Math stuff
Recurrence equation examples
Induction proof examples . . . Induction proof template
Representations of numbers  
factorial code to demonstrate overflow     factorial output  
Propositional Logic
Boolean Algebra
Predicate Logic

Exam
Midterm exam information
Don't study using the old exam. Study and then take the old exam in two hours.
They had a different lab3, but the exam problem still makes sense with your lab3.
Sample old midterm exam   .................... solution (within typos)
Final exam information


Practice Problems
Number Base Problems   ..............   solutions
Logic Practice Problems   ..............   solutions

Induction Problems   .......................   Solutions

Recursion practice: Determine if a char array (string) is a palindrome,
i.e., reads the same forwards and backwards (without blanks/punctuation).
E.g., dad, madam, redder, dammitimmad, gohangasalamiimalasagnahog.
    solution     another solution

Recursion practice: Count the nodes at level n in a binary tree
(root is at level zero)   ..............   solution

Find recurrence equation and big-oh for the nodes at level n in binary tree   ..............   Solution
Find recurrence equation and big-oh for the Towers of Hanoi (Hint)   .............. Solution

Big-O notes on summations
Big-O Practice Problems   ....................... Solutions

Intro parameter passing   ...................   Solution
Practice parameter passing   ...................   Solution
Another parameter passing one   ...................   Solution
More practice parameter passing using pointers   .......... Whiteboard solution .......... Step-by-step solution
Mess around with pointers ...................   Solution
"Why does this crash" question