Bryn Mawr College
CMSC 206: Data Structures
Fall 2017
Course Materials
Prof. Deepak Kumar
|
Texts | Important Dates | Assignments | Lectures | Course Policies | Links |
Instructor:
Deepak Kumar 202 Park Science Building 526-7485 dkumar at brynmawr dot edu http://cs.brynmawr.edu/~dkumar |
Lecture Hours: Tuesdays & Thursdays, 9:55a to 11:15a
Office Hours: Wednsedays from 1:00p to 3:00p
Room: Room 336 Park Science Building
Lab: Thursdays 11:25a to 12:45p in Room 231 (Attendance in Lab is REQUIRED)
(additional lab
hours will also available, see below).
Laboratories:
Lab Assistants: The following Lab assistants will be available during the week (names and schedules will be posted by the end of this week) for assistance on lab assignments.
Time | TA | Location |
Mondays 6-8pm | Kennedy Ellison | Park 231 |
Mondays 7-9pm | Ruby Malusa | Park 231 |
Mondays 8-10pm | Jocelyn Dunkley | Park 231 |
Tuesdays 6-8pm | Kellie Dinh | Park 231 |
Tuesdays 7-9pm | Sonya Fucci | Park 231 |
Wednesdays 6-8pm | Kellie Dinh | Park 231 |
Wednesdays 7-9pm | Jocelyn Dunkley | Park 231 |
Thursdays 6-8pm | Kennedy Ellison | Park 231 |
Sundays 6-8pm | Ruby Malusa | Park 231 |
Sundays 7-9pm | Sonya Fucci | Park 231 |
|
|
Course Description (from the Course Catalog): Introduction to the fundamental algorithms and data structures using Java. Topics include: Object-Oriented programming, program design, fundamental data structures and complexity analysis. In particular, searching, sorting, the design and implementation of linked lists, stacks, queues, trees and hash maps and all corresponding complexity analysis. In addition, students will also become familiar with Java’s built-in data structures and how to use them, and acquire competency in using a professional grade IDE.
Here is what we plan to learn this semester:
September 5: First lecture
October 3: Exam 1
November 9: Exam 2
December 14: Exam 3
Assignments
- Assignment#1: (Due on Tuesday, September 12): Click here for details.
- Assignment#2: (Due on Tuesday, September 26): Click here for details.
- Assignment#3: (Due on Thursday, October 12):Click here for details.
- Assignment#4: (Due on Thursday, October 26):Click here for details. New deadline: Tuesday, 0ctober 31.
- Assignment#5: (Due on Thursday, November 9): Click here for details.
Lectures
- Week 1 (September 5, 7)
September 5: Course introduction. What is data? What is a data structure? What is data abstraction? Role of data in everyday applications: deconstructing Uber - kinds of elements, data, logistics, etc. Overview of data structures, algorithms & complexity.
Read: Start reading Appendix A from K&W.
September 7: Introduction to Java. Writing and running Java programs. Using Eclipse. Java basics: Program structure, data types, veriables, constants, storage model (simple and reference types), type casting.
Read: Start reading Appendix A from K&W.
Assignment#1: (Due on Tuesday, September 12): Click here for details.
- Week 2 (September 12, 14)
September 12: Java basics: Program structure, data types, veriables, constants, storage model (simple and reference types), type casting. Arrays, array initialization.
Read: Appendix A from K&W.
September 13: Kellie Dinh's TA hours today will be from 5-7p.
September 14: Java basics: Functions, String type, exceptions and exception handling, file I/O.
Read: Appendix A from K&W.
Assignment#2: (Due on Tuesday, September 26): Click here for details.
- Week 3 (September 19, 21)
September 19: Errors - Syntax errors & runtime errors. Exceptions - checked & unchecked exceptions. Exception Handling - try-catch blocks. File IO - local data files & web data files. Begin Object-Oriented Programming review - Objects & classes.
Read: Chapter 1 from K&W.
September 21: Object-Oriented Programminfg (OOP) review: classes, objects, class/instance variables, constructors, methods (accessors, modifiers, predicates, print method), this. UML. Examples.
Read: Chapter 1 from K&W. Also skim Appendix B, if interested in UML.
S How to design Java programs. Top-down design and bottom-up incremental implementation.
- Week 4 (September 26, 28)
September 26: OOP design and implementation. Designing methods. Example: Doing Fraction arithmetic. Abstract Data Types and interfaces. Introducting Java Collections Framework.
Code: Assignment2, Place, Fraction
September 28: OOP in Java: Subclass, suprclass, interfaces, etc. Java Collections Framework. ArrayLists.
Sample Exam 1:Click here.
Assignment#3: (Due on Thursday, October 12):Click here for details.
- Week 5 (October 3, 5)
October 3: Exam 1 is today.
October 5: Exam review. ArrayLists in Java.
Lab:LastNames.txt
Read: Chapter 2 from K&W.
- Week 6 (October 10, 12)
October 10: Towards computational complexity and Big-O notation. Implementing ArrayLists.
Read: Chapter 2 from K&W.
October 12: Implementing ArrayLists: Using fixed sized arrays; using dynamic arrays.
Assignment#4: (Due on Thursday, October 26):Click here for details. New deadline: Tuesday, 0ctober 31.
- Week 7 (October 17, 19)
No Classes. Fall Break
- Week 8 (October 24, 26)
October 24: Linked Lists: Single/Double-linked Lists. Iterators. Java Collections Framework.
Slides:Linked Lists.
Note: Re: Assignment#4. There was a server upgrade over the break that has led to datafiles not being available through your programs. The files are accessible through the browser. One way to get around it is to download and copy the data files into a Data folder of your project and then access them from there. This is not ideal, but until the server issue is fixed, we will continue to copy the data files this way.
RESOLVED! Please use "https" instead of "http" to access datafiles on the web.
Read: Chapter 2 from K&W.
October 26: Iterators. Stacks & Queues. Applications of stacks (finding palindromes, arithmetic expressions). Applications of Queues (discrete event simulation). Implementing Stacks and Queues.
Slides:Stacks and Queues Part 1.
Read: Chapters 3 & 4 from K&W.
- Week 9 (October 31, November 2)
October 31: Stack implementations. Applications of stacks (finding palindromes, arithmetic expressions). Applications of Queues (discrete event simulation). Implementing Stacks and Queues.
Slides:Event Simulation
Read: Chapters 3 & 4 from K&W.
Assignment#5: (Due on Thursday, November 9): Click here for details.
November 2: Converting Infix expressions to postfix using stacks. Recursion.
Read: Chapter 5 from K&W.
Slides:Recursion.
- Week 10 (November 7, 9)
November 7: Recursion, contd. recursive linear search in an array. Making the search method generic: .equals(), Comparable interface). Towers of Hanoi.
Read: Chapter 5 from K&W.
November 9: Exam 2 is today. NO Lab Today, due to exam.
- Week 11 (November 14, 16)
November 14: Sorting: Quadratic Sorting algorithms- Selection Sort, Bubble Sort, Insertion Sort.
Slides:Quadratic Sorting algorithms. Exam 2 Solutions.
Read: Chapter 8 (Sections 8.1-8.5)
November 16: Sorting: Quadratic Sorting algorithms- Selection Sort, Bubble Sort, Insertion Sort. Trees: An Introduction. Hierarchical data structures. properties of trees. Binary Trees- defintion and applications. Tree traversals.
Slides: Introduction to Trees.
Read: Chapter 6 from K&W.
- Week 12 (November 21, 23)
November 21: Binary Trees. Implementing Binary Trees in Java.
Slides:Implementing Binary Trees.
Read: Chapter 6 from K&W.
November 23: No class. Thanksgiving!
- Week 13 (November 28, 30)
November 28: Implementing Binary Search Trees. Heaps & Priority Queues.
Read: Chapter 6 from K&W.
Slides: BSTs & Heaps.
Lab#10 Code: BinaryTree class.
Assignment#6 (Due on Tuesday, December 12): Click here for details.
November 30: No class as Deepak is out of Town. No lab today as well. Lab handout was given in class on 11/28.
- Week 14 (December 5, 7)
December 5: Sets & Maps. Sets in Java. Hash tables: hash functions, collisions, open addressing, linear probing, load factor. Hash tables in Java.
Read: Chapter 7 from K&W.
Slides: Sets & Maps.
December 7: Hash tables, wrap up. Three more sorting algorithms: Merge Sort, Heap Sort, Quick Sort.
Read: Chapter 8 from K&W.
Slides: Three more sorting algorithms.
- Week 12 (December 12, 14)
December 12: Quicksort - Partitioning. Course review and wrap up.
Slides: Course wrap up.
December 14: Exam 3 is today.
Communication
Attendance and active participation are
expected in every class. Participation includes asking questions,
contributing answers, proposing ideas, and providing constructive
comments.
As you will discover, I am a proponent of two-way communication
and I welcome feedback during the semester about the course. I am available to answer questions, listen to concerns, and
talk about any course-related topic (or otherwise!). Come to
office hours! This helps me get to know you. You are welcome to
stop by and chat. There are many more exciting topics to talk
about that I won't have time to cover in-class.
Please
stay in touch with me, particularly if you feel stuck on a topic
or assignment and can't figure out how to proceed. Often a quick
e-mail, phone call or face-to-face conference can reveal solutions
to problems and generate renewed creative and scholarly energy. It
is essential that you begin assignments early.
Grading
There will be 6-8 assignments,
weighted equally in the final grading (see below). Assignments must be
submitted according to the instructions provided in each assignment.
At the end of the semester, final grades will be calculated as a
weighted average of all grades according to the following weights:
Exam 1: 20%
Exam 2: 20%
Exam 3: 20%
Lab Attendance: 10%
Assignments: 30%
Total: 100%
Incomplete grades will be given only for verifiable medical
illness or other such dire circumstances.
Technology in the classroom
The class meetings/lectures will be a place to learn the concepts that are a part of the syllabus. I will, in the course of a lecture, write code on the board, and/or even do some live coding in class. The objective of this is to illustrate to you how to go about applying the concepts in practice. It is NOT a place for you to open your laptops and start to code with me. In fact, you are encouraged NOT to bring your laptops to class to use them for any purpose. It is distracting to other students. Phone (smart or otherwise) and tablet use during class meetings is also strongly discouraged. Listen, understand, ask questions, and take notes in a notebook if you need to. You will learn more! There will be scheduled class meetings in the lab. I will announce these and this is where you will be doing the coding under my supervision.
The assignments in this course are a place for you to exercise your learning of the concepts and apply them in actual working programs. The best way to get the most of of this course is to try out and code the concepts learned in the class (outside the class!). Do not be afraid to try things! This will improve your understanding and raise questions that you should feel free to bring forward in class. A quick word of advice: stay abreast of the material covered in class, and start your assignments on the day they are announced.
Submission, Late Policy, and Making Up Past Work
All work must be turned in either in hard-copy or electronic submission, depending on the instructions given in the assignment. E-mail submissions, when permitted, should request a "delivery receipt" to document time and date of submission. Extensions will be given only in the case of verifiable medical excuses or other such dire circumstances, if requested in advance and supported by your Academic Dean.Exams
There will be three exams in this course. The exams will be closed-book and closed-notes. The exams will cover material from lectures, homeworks, and assigned readings.
Study Groups
I encourage you to discuss the material and work together to understand it. Here are some thoughts on collaborating with other students:
Created on July 28, 2014.