­­­­ CPSC259: Data Structures and Algorithms for Electrical Engineers

Course Description

This course is a continuation of C programming from APSC 160. It is aimed at Electrical Engineering students who are not in the Computer Engineering option, and will cover topics in basic data structures, algorithms, and C programming. You will learn about pointers, recursion, linked lists, stacks, queues, searching, sorting, hash tables, trees, and graphs. Besides C, there will also be some work in Matlab (e.g., calling Matlab from a C program). Lab work will have in-lab and take-home components, including some short programming tests in the labs. Except for the in-lab programming tests, you will use pair programming for your labs. Plenty of TA help is available.

Course Schedule

Lab TAs

Lab Section Point of Contact Lab TA Lab TA Lab Marker
L1A (Mon 9:00-11:00): Marjan Bo Catherine
L1B (Mon 14:00-16:00): Michael Tommy Catherine
L1C (Thu 10:00-12:00): Jonathan Michael Victor
L1E (Fri 12:00-14:00): Oliver Marjan Oliver
L1F (Tues 15:00-17:00): Tommy Bo Oliver
L1G (Tues 13:00-15:00): Bo Tommy Peiyu
L1H (Tues 9:00-11:00) Bo Tommy Peiyu


APSC 160 or equivalent. You are expected to know how to program in C at the level of functions and arrays before taking this course. If you need a refresher in C, then please: (a) re-read parts of the Etter textbook (the same textbook used in APSC 160), (b) read the "Essential C" document (see below), and (c) practice writing some short programs with Microsoft's Visual Studio 2012 C/C++ compiler on your own. There are lots of examples available.


Textbooks (You are permitted to bring them to the lab for reference, and to use them during your programming tests in the lab.)

Programming Environment

We will use Microsoft Visual Studio 2012 Professional (i.e., for Visual C/C++) as the Integrated Development Environment (IDE) in the lab, and we recommend that you use it at home, too. It actually compiles both C and C++ code; so, if you see any references being made to Visual C++, don't worry - it's the same product. However, for this course, you will only write C code, and not C++ code (which most of you won't know anyway).

Engineering students can download a free copy of Microsoft's Visual Studio Professional using the ECE or CPSC department's DreamSpark academic licensing arrangement (formerly the MSDNAA agreement). Details are available in the Lab 1 document.

This course uses the automated "handin" facility to submit your code for marking. Details will be given to you in the lab specifications. The handin facility gives you an acknowledgement upon submitting your work; therefore, pay careful attention to it -to make sure that you've submitted your work correctly.


Your performance in the class will be based on a number of activities. Final grades will be calculated as follows:

To pass the course, you must obtain at least a 50% overall course mark (as per the above formula) and you must pass the final exam. In keeping with Department policy, students who fail the final exam receive a course grade of min{45, x} where x is the overall course mark.


Like APSC 160, we will be using iClickers for this course. Clicker marks will be by participation only, and we'll count your best 90% just in case you were sick, visited the dentist, attended a funeral, forgot your clicker, found out that your batteries died, missed the bus, slept in, had a bad day, etc. The purpose of iClickers is to help students engage/connect more with the lecture material, including programming concepts. Research in many schools throughout the world has shown that clickers are very effective tools for class engagement and learning.


We will be using PeerWise this semester. You will be generating your own multiple-choice questions and sharing them with one another. Our aim is to empower you to think about ways of evaluating understanding of a learning goal while having the opportunity to gauge your own understanding of it in the process. Use of PeerWise enables you to get immediate feedback on your work and allows you to compare yourself to your peers. In addition, by using crowdsourcing, we can create a pool of high-quality multiple-choice questions that can be used in the future offerings of the course.

Please follow the steps for registering your PeerWise account.
1. Access the Peerwise website here.
2. Click "Registration" under the login box and click "Start Registration" on the next page.
3. Follow the registration prompts (your PeerWise Identifer can be found on Connect as a 6 digit number).

A quick guide and overview of PeerWise can be found here: PeerWise Outline.

Deadlines in regards to PeerWise are posted on the course calendar. If there are any concerns or issues regarding the setup or use of PeerWise, please refer to Piazza or email Victor.


If you cannot write an exam (e.g., due to illness), you must obtain suitable documentation (e.g., doctor's note) and inform the instructor ASAP-not after you've written the exam. With appropriate medical documentation, and at the discretion of the instructor, you will either write a different midterm at a future date determined by the instructor, or your final exam mark will be applied to your midterm mark.

The final exam will cover the whole course, and its time and date will be determined by the Registrar's office. If you are sick for the final exam, then you must get a doctor's note, and deliver it to the Faculty of Applied Science. This opens the door for me to give you a different exam at a future date to be determined by the Registrar's office.

Midterm Dates:


The Piazza bulletin board is required reading. It will be used for important material that may not be mentioned in class. Problems with the CPSC 259 course contents (e.g., lecture, lab, textbook, assignments) can be posted on Piazza, but please check to make sure that your question hasn't already been asked or answered. Piazza is read by all students in our class, and the TAs and instructor; therefore, a lot of us can respond to your questions. Students are encouraged to ask questions, and to respond to other students' questions, as long as the questions don't ask for answers to homework. Selected individuals that actively respond to postings on Piazza, may receive a bonus mark of up to 1%.

Please do not send e-mail to the instructor or the TAs in order to get us to debug your code. Instead, please bring your questions to the lab, either during your scheduled lab time or during the extra office hours provided by the TAs during the week. please limit emails to the instructor and the TAs to items of a personal or confidential nature.

Electronic Information Sources

Most material that we will use in this course will be available at the following URLs:

Course Policy on Plagiarism

Although you may discuss problem solving approaches to homework with other students, and get help from the TAs, you and your partner (as a team) must do your own work. Plagiarism occurs when you submit someone else's work as if it were your own. Examples of plagiarism include: copying some or all of another team's code; hiring a tutor to write some of the code for you; sending someone (other than your partner for that lab) your code via e-mail, text message, Skype, Facebook, Microsoft Messenger, etc., (even if it's just for "reference purposes"); and so on.

The penalty for plagiarism can be a suspension from the University for 4-12 months and a grade of zero in the course. So, please don't turn in someone else's work.

Dr. Tamara Munzner has also set up a few pages about academic conduct for one of her courses. Most of the rules in Dr. Munzner's course also apply to our course--ask Dr. Khosravi or a TA if you're not sure before you do something that might be plagiarism. Note that you will use pair programming in our labs, so working with a partner is of course acceptable providing it's with your actual lab partner for that specific lab. Use common sense. To prevent misunderstandings, remember to ask your TAs or instructor for any clarifications.


Slides and other course materials are based on previous materials from others, especially Dr. Ed Knorr.