Data Structures for Problem Solving, Section 02
The main course webpage is at
Instructor: Ivona Bezakova (email)
Section meets: Tu/Th/Fr 2-3:50pm, room 70-2400
Student center: open almost all the time - check the schedule on the above website to see when the 242 SLIs staff the center
Instructor's office hours: Tu 4-5pm, Th 3-5pm, Fr 3-4pm (if I am not in my office on Th/Fr at 3pm, please look for me in the faculty copy room, right opposite to the 3435 classroom)
I will use this webpage for announcements and material specific to our section.
Please check the main webpage (see link above) for syllabus, schedule, etc.
- Week 1: slides and all the code from class can be found here.
The lab code can be downloaded here.
- Please change .txt suffix to .py suffix. (Suffix .py is not downloadable by most browsers.)
- I summarized the discussion from class regarding the traversal functions on the slide.
- I also included a delete function at the end of the code from class. This is to give you an idea
about how to manipulate individual nodes if changes occur in the list. I strongly encourage you to review
and fully understand the code before the lab on Thursday/Friday.
- I posted one code (LinkedListTurtle) that addresses the first problem from the lecture notes.
The code simply draws a given list as a histogram, using the Turtle.
- The code includes a recursive implementation of delete, for comparison.
- Week 2: slides, the implementation is posted on the course website
- Week 3: slides, the backtracking implementation of map coloring from class
can be found here. You will need to download the graphic package and the datafiles with
the maps from the course webpage - no need to install anything, just unpack it.
- Week 4: slides, the code from class can be found here.
Also, project part 2 has been posted,
additional information will be provided during the problem solving session.
Recall that next week is the midterm week. See the section below for more information.
- Week 6: slides, we will discuss the last slide during the problem solving sessions.
The code has been posted on the main course website.
- Week 7: slides, the implementations (from class) of the Merge Sort and the Book Index
code that uses Merge Sort (or Bubble Sort for comparison of the running times)
can be found here.
(I included a fixed Merge() function, the function from class was correct but was slower because Python implements
list slicing like Asorted[1:] in time O(n) and thus the original Merge took O(n2) time -
to get overall O(n log n) running time, we need Merge() to run in time O(n).
Check the new Merge() function and let me know if you are having troubles understanding it.)
- Week 8: slides.
- Week 9: slides.
- Week 10: slides, the practice problems are also posted on the official website.
Final exam information::
- Pen and paper: Tuesday, Jan 12, 2-3:50pm, in class
- You can expect about a problem from each of these areas:
- Linked lists and operations on them.
- Stacks and queues and the operations supported by each of these datastructures.
- Graphs and depth/breadth-first search.
- Backtracking and dynamic programming. You should understand how dynamic programming works on the example from class but you
do not need to be able to design your own dynamic programming pseudo code.
- The types of problems on the midterm include: write your own pseudo code, fix an existing pseudo code,
trace a given pseudo code, explain how a datastructure works (how to construct it, what operations the data structure supports and what is their time complexity, etc),
short answer/multiple choice questions. Do not forget about testing and time complexity, there is also a possibility for drawing stack frame diagrams.
- Read through the posted lecture notes,
materials posted on this site, the lab assignments, and your notes from class.
- Go through the lab problems on your own, do the same with the problems from the SI sessions.
- There's plenty of available help: instructor's office hours, the SI (David), the SLIs (Jason and Gabbie), other SLIs in the tutoring center.
- This portion of the exam is closed books and notes.
- Computers: Thursday, Jan 14, the Thursday-lab group takes the test 2-2:50pm, the Friday-lab group
takes the test 3-3:50pm.
- You will be asked to manipulate a linked list-type data structure. Practice on linked lists, queues, stacks, etc., using
the Node class from week 1. Implement basic list operation functions such as insert(), delete(), print(),
- This part of the exam is open book and lecture notes - feel free to bring a Python reference book and printouts of
the lecture notes (not the Python code).
- Submission is through MyCourses so make sure that you a) submit on time, and b) get an e-mail receipt of the submission.
- The second group (that takes the exam at 3pm) is not allowed to walk along the corridor next to ICL5 and ICL6.
- The first group needs to stay until the end to avoid meeting the second group
(bring something to do in case you plan to finish early).
- You may work on your own laptops. The only software allowed to be actively open is (a) Python IDLE, and (b) a web browser
with the lecture notes, Python manual pages, MyCourses at the time of the submission and a brief skim through
your e-mailbox to make sure that the submission was recorded properly.
- Final exam takes place on Thursday, Feb 25, 2:45-4:45pm, in 70-2400
- You may bring letter-size double-sided handwritten (your own handwriting, no photocopies) cheat-sheet.
- Format will be similar to the written portion of the midterm exam. The exam will consist of:
- Short answers questions covering: describe a given data structure, trace an algorithm (new or from class),
read Python code.
- Read/write/fix/trace pseudo code, including stack frame diagrams.
- About two lab-like problems, see the posted review slides. A lab-like problem typically asks for: solution design,
pseudo code, time complexity estimate, testing.
- Review all topics, including material before the midterm.
- Sample problems: check the practice problems posted on the official website,
under Schedule. We solved some of them on the slides from week 10, linked above.
- David's SI session takes place on Friday, Feb 19, 2-4pm, in 70-2400.
- Gabbie and David are preparing a review session on Wednesday, Feb 24, 6pm, in 70-3660.
- SSE will also hold a review session, time and location to be announced (watch your e-mails).
- Please recall that the exam cannot be made up except for real emergencies in which case a
proof (e.g. a doctor's note) will be required. The only exception to this rule is if you are suffering from H1N1
and do not have a doctor's note: notify the instructor immediately by e-mail, definitely *before* the exam.
- Good luck on all your exams.