Computer Science 345

Data Structures and Algorithms
Spring 2019
Thomas VanDrunen



Meeting time: MWF 11:35am-12:45pm.
Meeting place: Meyer 131

Office hours: MWF 3:30-4:30 pm; Th 9:00-10:30 am, 11:00-11:30, and 1:15-3:15 pm.
Contact: 163 Science; 752-5692; Thomas.VanDrunen@wheaton.edu
http://cs.wheaton.edu/~tvandrun/cs345


Syllabus
Project guide
Information about Algorithmic Commonplaces



Final exam: Tue, May 7, 10:30am-12:30pm


Color code:
Green: Read carefully before class. In-class activities will be planned under the assumption that you have read this.
Magenta: Read sometime. I will lecture on this material, but you are responsible for details in the book that aren't covered in class.
Moon's dayWoden' s dayFrigga's day

Jan 14

Prolegomena. Introduction, 1.1

Project: Pre-test exerciseDue Jan 16
Read 1.(1&2), pg 5-26

Jan 16

Algorithms and correctness, 1.2
Slides

Read 1.3, pg 26-36

Jan 18

Algorithms and correctness, 1.2; algorithms and efficiency, 1.3
Slides

Do Ex 1.9 (pg 14)

Jan 21

NO CLASS

Jan 23

Algorithms and efficiency, 1.3
Slides

Read 1.4, pg 36-49

Jan 25

Abstract datatypes, 1.4
Slides


Project: Implementing ADTs
Do practice problem from Wed handout.
Read 1.5, pg 50-80

Jan 28

Data structures
Problem solution
Slides

Practice problems
Read 1.(7-9), pg 81-118

Jan 30

No class: College closed for cold weather

Practice problems
Read 2.1, pg 119-132

Feb 1

Case studies. Counting sort and radix sort, 2.1
Slides

Project: Linear sorting
Read 2.2, pg 133-150

Feb 4

More about counting sort and radix sort, 2.1

Feb 6

Disjoint sets, 2.2
Slides

Read 2.3, pg 150-172

Feb 8

Heaps and priority queues, 2.3
Slides

Project: Heaps
Read 2.4, pg 173-182

Feb 11

Bit vectors, 2.4
Slides

Project: Bit vectors
Read 3.(1 & 2), pg 185-199

Feb 13

Graphs. Concepts and implementation, 3.(1 & 2)
Slides

Read 3.3, pg 199-201

Feb 15

Graph traversal, 3.3


Read 3.4, pg 201-206
Do practice problem from handout

Feb 18

NO CLASS

Feb 20

Minimum spanning trees, 3.4
Slides

Project: MST
Read 3.5, pg 206-213

Feb 22

Single-source shortest paths, 3.5
Slides

Project: SSSP

Feb 25

Finishing graphs

Feb 27

Review

Mar 1

Test

Read 4.(1&2) pg 215-236

Mar 4

Trees. Binary search trees introduction, 4.(1 & 2)
Slides

Practice: BST as ordered map
Read 4.3, pg 236-246

Mar 6

More about binary search trees; AVL trees
Slides

Read 4.3, pg 236-246

Mar 8

More about AVL trees, 4.3

Project: AVL trees
Read 4.4, 247-256

Mar 11

NO CLASS

Mar 13

NO CLASS

Mar 15

NO CLASS

Mar 18

Traditional red-black trees, 4.4
Visualization by David Galles
Slides

Project: Traditional RB trees
Read 4.5, pg 267-272

Mar 20

Left-leaning red-black trees, 4.5
Slides

Practice: LLRB trees
Read 4.(6 & 7), pg 279-288

Mar 22

Finishing balanced trees
Slides

Read 5.(1 & 2), pg 289-295

Mar 25

Dynamic programming. Introduction, 5.(1 & 2)
Slides

Practice: Dynamic programming
Read 5.(2&3)

Mar 27

Principles of dynamic programming, 5.3

Read 5.4, pg 298-299

Mar 29

Examples of dynamic programming algorithms, 5.4
Slides

Read 5.5, pg 300-306

Apr 1

Optimal BSTs. 5.5
Slides

Project: Optimal BSTs

Apr 3

Finishing optimal BSTs

Apr 5

Review


Apr 8

Test

Read 6.(1&2), pg 309-323

Apr 10

No class: family illness

Apr 12

Hash tables. Introduction to hashing and separate chaining, 6.(1&2)
Slides

Practice: Separate chaining
Read 6.3, pg 323-340

Apr 15

Open addressing with linear probing, 6.3
Slides

Project: Linear probing
Read 6.5, pg 340-354

Apr 17

Hash functions, 6.5
Slides

Read 6.6, pg 354-361

Apr 19

NO CLASS

Apr 22

Perfect hashing, 6.6; hashing wrap-up, 6.7
Slides

Project: Perfect hashing
Read 6.7, pg 361-368

Apr 24

Strings. String sorting; radix sort revisited, 7.1

Practice: string sorting algorithms

Apr 26

Tries, 7.2
Slides

Project: Tries

Apr 29

Regular expressions, 7.5

May 1

Regular expression practice

Practice: regular expressions

May 3

Review