Bryn Mawr College
CMSC 206: Data Structures
Fall 2016
Course Materials
Prof. Deepak Kumar
|
Texts | Important Dates | Assignments | Lectures | Course Policies | Links |
Instructors:
Deepak Kumar 246-B 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: Fridays 10:10a to 12 noon in Room 231 (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.
|
|
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:
she++: The Documentary from Ellora Israni on Vimeo.
August 30: First lecture
September 27: Exam 1
November 3: Exam 2
December 8: Exam 3
Assignments
- Assignment#1 (Due on Thursday, September 8): Click here for details.
- Assignment#2: (Due on Thursday September 22): Click here for details.
- Assignment#3: (Due on Tuesday, October 4): Click here for details.
- Assignment#4: (Due on Tuesday, November 1): Click here for details.
- Assignment#5 (Due on December 1): Click here for details.
- Assignment-Extra Credit (Due on December 8): Click here for details.
Lectures
- Week 1 (August 30, September 1)
August 30: 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 1: 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 Thursday, September 8): Click here for details.
- Week 2 (September 6, 8)
September 6: Java Basics: A review. Java program structure. Data Types in Java: numbers (byte, short, in, lond, float, double), char, boolean. Strings. Storage model: simple types, reference types. Arrays in Java.
Read: Appendix A from K&W.
September 8: Java Basics: A review. Statements-assignment, conditional (if/else, switch), loops (for-, while, do-), exception handling (try-catch). File I/O using the Scanner class.
Read: Start reading Chapter 1 from K&W.
Assignment#2: (Due on Thursday September 22): Click here for details.
- Week 3 (September 13, 15)
September 13: Discussion on Assignment#1. Errors: Syntax, runtime, and logic errors. Exceptions: quick overview. File I/O review from lab. Doing I/O from web hosted files. 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.
September 15: 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.
- Week 4 (September 20, 22)
September 20: Object0oriented programming: basics, terminology, design, and implementation. Contd.
September 22: Object0oriented programming: basics, terminology, design, and implementation. Contd. Interfaces and acbstract classes. Java Collections Framework: First Look. The List interface.
Assignment#3: (Due on Tuesday, October 4): Click here for details.
- Week 5 (September 27, September 29)
September 27: Exam 1 is today.
September 29: ArrayLists in Java. Interfaces. Containers. The Java Collections Framework - First View.
Read: Chapter 2 (Sections 2.1-2.3) from K&W.
- Week 6 (October 4, 6)
October 4: Linear Search: searching for one versus searching for all matches. Introduction to time and space complexity. Interfaces. Containers. The Java Collections Framework - First View.
Read: Chapter 2 (Sections 2.1-2.3) from K&W.
October 6:
October 7: Lab today is cancelled. You will get the Lab#6 handout in class this thursday, October 6. You may use the lab time to do this lab, or do it over the break.
- Week 7 (October 11, 13)
No Classes. Fall Break
- Week 8 (October 18, 20)
October 18: ArrayLists wrap up. Linked Lists: introduction, implementation. Comparison with ArrayList.
Read: Chapter 2 from K&W.
October 20: Linked Lists wrap up. Variations on linked lists: singly-linked lists, doubly-linked lists, lists with head and tail, circular lists. Comparing efficiency of ArrayList and LinkedList operations.S
Assignment#4: (Due on Tuesday, November 1): Click here for details.
- Week 9 (October 25, 27)
October 25: Queues: FIFO regime.Queues in Java Collections and how to use. Introduction to discrete event simulation using queues.
Read: Chapter 4 from K&W.
October 27: Stacks: LIFO regime. Stacks in Java. Stack applications: balancing parentheses, check for palindromes, evaluating postfix expressions, convertine infix expressions to postfix.
Read: Chapter 3 from K&W.
- Week 10 (November 1, 3)
November 1: Recursion: refresher. Writing recursive functions. Tracing the execution of recursive functions. The added complexity of recursive functions. Writing iterative versions of recursive functions.
Read: Chapter 5 from K&W.
November 3: Exam 2 is today.
- Week 11 (November 8, 10)
November 8: Searching efficiently. Binary search: recursive, iterative. Cost of using Binary Search: requires sorting!
Read: Binary Search from Chapter 5. Read Sections 8.1-8.5. All from K&W.
November 10: Sorting. Sorting using Java API. Sorting algorithms: Bubble Sort, Selection Sort, Insertion Sort.
Read: Binary Search from Chapter 5. Read Sections 8.1-8.5. All from K&W.
- Week 12 (November 15, 17)
November 15: Trees: Terminology-root, branches, nodes (external, internal), successors, parent, siblings, subtree. Tree Properties-level, height, full, perfect, complete, etc. Types of Trees-Binary, Ternary, Quad. Expression Trees, Binary Search Trees. Binary Tree Traversals: pre-order, in-order, post-order. Search in trees-depth-first and breadth-first. Binary Tree implementation -representations:arrays, array of nodes, linked.
Read: Chapter 6 from K&W.
November 17: Implementing BinaryTree class. BST implementation. Innerclasses and protected types in Java. Defining your own exceptions, and raising them.
Read: Chapter 6 from K&W.
November 18: Lab#10: Code: BinaryTree class.
Assignment#5 (Due on December 1): Click here for details.
- Week 13 (November 22, 24)
November 22: Binary Trees, contd. Heaps (Min-, Max-), Sets, Maps, hash tables.
Read: Section 6.5, 7.1-7.3 from K&W.
Assignment-Extra Credit (Due on December 8): Click here for details.
November 24: No class. Thanksgiving!
- Week 14 (November 29, December 1)
November 29:Sorting: Beyond quadratic sorting algorithms. Merge Sort, Heap Sort, Quick Sort.
Read: Chapter 8 from K&W.
December 1: Course wrap up.
- Week 15 (December 6, 8)
December 6: No class today, Deepak is out of town.
December 8: 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%
Assignments: 40%
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.