Computer Science 345

Data Structures and Algorithms
Spring 2018
Thomas VanDrunen



Meeting time: MWF 12:55-2:05 pm.
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



Final exam: Wed, May 2, 10:30am-12:30pm


Moon's dayWoden' s dayFrigga's day

Jan 8

Prolegomena. Introduction. 1.1

Practice: Pre-test exercise
Read 1.(1&2), pg 5-26

Jan 10

Introduction; correctness of algorithms. 1.(1&2)
Slides

Jan 12

Correctness of algorithms. 1.2

Do Ex 1.9 (pg 14) Solution
Read 1.3

Jan 15

NO CLASS

Jan 17

Efficiency of algorithms. 1.3
Slides

Read 1.(4&5)
[For Mon, do practice problem]

Jan 19

Abstract datatypes. 1.(4&5)
Slides


Project: Implementing ADTs
Read 1.(6&7)

Jan 22

Abstract datatype; various programming practices. 1.(5&6)


Read 2.1

Jan 24

Various topics. Case study: Counting sort and radix sort. 2.1
Slides

Project: Linear sorting
Read 2.2

Jan 26

Finishing linear sorts


Read 2.3

Jan 29

Case study: Disjoint sets and union/find. 2.2


Read 2.3

Jan 31

Case study: Heaps and priority queues. 2.3
Slides

Project: Heaps
Read 2.4 (new) and DMFP 10.(1&6)

Feb 2

Case study: Bit vectors. 2.4

Project: Bit vectors
Read 3.1 and DMFP 8.(1-3)

Feb 5

Graphs. Introduction and concepts. 3.1
Slides

Read 3.2

Feb 7

Graph implementations. 3.2
Slides

Read 3.3

Feb 9

Graph traversal. 3.3
Notes about iterators

Practice: graph traversal
Read 3.4

Feb 12

Minimum spanning tree. 3.4
Slides

Project: MST
Read 3.5

Feb 14

Single-source shortest path. 3.5
Slides

Project: SSSP

Feb 16

Finishing graphs

Feb 19

NO CLASS

Feb 21

Review

Feb 23

Test

Read 4.1 (new)
Please also read the exercises a the end of the section.

Feb 26

Trees. Binary search trees introduction. 4.1

Practice: BST as ordered map
Read 4.3

Feb 28

Balanced BSTs. 4.3
Slides


Read 4.4

Mar 2

AVL trees. 4.4
Slides

Project: AVL trees
Read 4.5

Mar 5

NO CLASS

Mar 7

NO CLASS

Mar 9

NO CLASS

Mar 12

Traditional red-black trees. 4.5
Visualization by David Galles
Slides

Project: Traditional RB trees
Read 4.6

Mar 14

Left-leaning red-black trees. 4.6
Slides

Practice: LLRB trees
Read 4.(7 & 8)

Mar 16

Finishing balanced trees: Two-three trees and B-trees. 4.(7 & 8)

Read 5.1

Mar 19

Dynamic programming. Introduction. 5.1

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

Mar 21

Examples and principles. 5.(2&3)
Slides

Project: Optimal BSTs
Read 5.4

Mar 23

Examples of dynamic programming algorithms. 5.4
Slides

Read 5.5

Mar 26

Optimal BSTs. 5.5

Mar 28

Finishing optimal BSTs

Mar 30

NO CLASS

Apr 2

Review

Apr 4

Test

Read 6.(1&2)

Apr 6

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

Practice: Separate chaining
Read 6.3

Apr 9

Open addressing with linear probing. 6.3
Slides

Project: Linear probing
Read 6.4

Apr 11

Hash functions. 6.5
Slides

Read 6.6

Apr 13

Perfect hashing. 6.6
Slides

Project: Perfect hashing

Apr 16

Hashing wrap-up.

Read 7.1

Apr 18

Strings. String sorting; radix sort revisited. 7.1

Practice: string sorting algorithms
Read 7.2

Apr 20

Tries. 7.2
Slides

Project: Tries
Read DMFP 12.4

Apr 23

Regular expressions. 7.5
Slides

Apr 25

Regular expression practice

Practice: regular expressions

Apr 27

Review