ECE218 R Data Structures Spring 2026
Tue & Thur, 2:00 to 3:15, in LC 182

Useful information and things

Examinations:

Assignments:

Read the Important Rules link above.
All to be submitted on blackboard (under Assignments)
Submissions should be clearly readable word documents.

    1   Due: Sunday 8th Feb.
       Reverse Polish Calulator.
2Due: Sunday 8th March
Your own virtual machine

Class History

Class 1 - Tue 13-1-2026    Data structures we are going to be working on, pointers, vectors, linked lists, binary trees.
A few notes about using pointers.
Class 2 - Thur 15-1-2026 Reviewing C++ things that we should mostly already know.
Class 3 - Tue 20-1-2026 And some things that we might not already know.
Surprise behaviours of C++ things, kinds of numbers, etc.
Class 4 - Thur 22-1-2026 Reverse Polish notation, stacks, and #include <vector>.
Class 5 - Tue 27-1-2026 (many) words on the first assignment.
A stringstream trick, the int operators ^ & | << >>
Practice with objects: start, next step, where we got.
Class 6 - Thur 29-1-2026 (look at this again first)
non-member operators, protection, member operators, operator<<
We made a stack of strings (called svector) with a destructor.
Class 7 - Tue 3-2-2026 splitting a program into multiple .cpp and .h files for separate compilation.
templates for classes and functions.
Amortised analysis of big-O for vector push if growth is incremental.
Class 8 - Thur 5-2-2026 Sum of series for growth by doubling.
How to use the debugger - essential stuff.
A design for a simple virtual machine.
Class 9 - Tue 10-2-2026 operator[], operator=, copy constructor.
doing multi-dimensional arrays properly.
Class 10 - Thur 12-2-2026 Review of the first quiz, I hope we learn the lesson.
More ways of handling multi-dimensional arrays. <cstdarg> for an unknown number of parameters.
C's printf function from <cstdio> is worth knowing about.
Class 11 - Tue 17-2-2026 Virtual machines and the insides of real computers.
An attempted database, pointers saved us.
Class 12 - Thur 19-2-2026 Why did pointers save us? (References almost could have too)
Constructors and destructors to automatically trace functions.
Accurately measuring the time it takes to sort an array.
Class 13 - Tue 24-2-2026 Pop Quiz 2 correction.
A closer examination of selection sort.
Loop invariants and loop varients establish/demonstrate correctness.
Bubble sort and selection sort.
All sorting algorithms so far quadratic time.
Class 14 - Thur 26-2-2026 Reference implementation to help experiment with the VM assignment.
Shell sort has a few advantages.
Cutting array in half, sorting the halves, and recombining in order almost halves the time required.
The magic of merge sort makes the sorting disappear.
Merge-sort's time is NlogN. Although logarithms in all bases are proportional, knowing it is base 2 is important.
Class 15 - Tue 3-3-2026
Class 16 - Thur 5-3-2026 First mid-term test.
       Vectors and multi-dimensional arrays: the C++ way and making your own.
       Classes, methods, con/de-structors, operators, static things...
       Quadratic sorting algorithms, Big Os and timing calculations.
And of course general C++ and programming will be required.
A sample test and its solution,
Another sample and its solution.
Another sample.
Yet another sample and its solution.
Some of these questions are not relevant yet, you will not be tested on anything we haven't covered yet.
Break 9th to 13th
Class 17 - Tue 17-3-2026
Class 18 - Thur 19-3-2026
Class 19 - Tue 24-3-2026
Class 20 - Thur 26-3-2026
Class 21 - Tue 31-3-2026
Class 22 - Thur 2-4-2026
Class 23 - Tue 7-4-2026
Class 24 - Thur 9-4-2026
Class 25 - Tue 14-4-2026
Class 26 - Thur 16-4-2026
Class 27 - Tue 21-4-2026
Class 28 - Thur 23-4-2026