Lecture 19
Self-organizing data structures: lists, splay trees Data structures for multidimensional data: K-D trees Review and overview of the C+ Standard Template Library Final review Reading: Weiss, Ch. 4 and Ch. 12
CSE 100, UCSD: LEC 19
Page 1 of 31
S
Lecture 2
An introduction to C+ Comparisons of Java to C+ Basic C+ programming C+ primitive types and operators Pointers in C+
CSE 100, UCSD: LEC 2
Page 1of 38
An introduction to C+
C+ is an object-oriented language based on the non-object-oriented C la
Lecture 3
References in C+ The "const" qualifier Arrays, pointers and pointer arithmetic The interface/implementation distinction in C+ C+ class templates "friend" visibility Reading: Weiss Ch 1
CSE 100, UCSD: LEC 3
Page 1of 34
A java program operat
Lecture 4
Binary search tree average cost analysis The importance of being balanced AVL trees and AVL rotations Insert in AVL trees Reading: Weiss Ch 4, sections 1-4
CSE 100, UCSD: LEC 4
Page 1 of 40
Best, worst, and average case time costs in data struc
Lecture 6
Randomized data structures Random number generation Skip lists: ideas and implementation Skip list time costs Reading: "Skip Lists: A Probabilistic Alternative to Balanced Trees" (author William Pugh, available online); Weiss, Chapter 10 sectio
Skip List Review
Draw the Skip List that results from inserting the following elements with the following levels Elements: 42, 3, 12, 20, 9, 5 Levels: 3, 1, 1, 2, 1, 2
Skip List Implementation
header:
. . . . SkipNode
3
5 9 12 20 42
SkipList
What data is
Red Black Trees, review
Which of the following are legal red-black trees?
12 12
5
82
12
2
81
5
82
2
12 5 3
9
81
90
82
9 81 90
85
2
85
Red-Black Trees
12
5 82 81
2
Insert 3 into this red-black tree and draw the resulting structure 1. 2. 3. 4. Nodes are eit
Lecture 9
Time and space cost analysis of Huffman coding Huffman coding tree implementation issues Priority queues and priority queue implementations Heaps Dynamic data and array representations for Huffman trees Reading: Weiss Ch. 6, Ch. 10.1.2
CSE 100,
Lecture 10
C+ I/O Some useful classes in <iostream> I/O buffering Bit-by-bit I/O Reading: online documentation on C+ streams
CSE 100, UCSD: LEC 10
Page 1 of 23
A quick tour of the C+ I/O classes
The C+ standard library defines classes used for I/O We wi
Lecture 11
Graphs Vertices, edges, paths, cycles Sparse and dense graphs Representations: adjacency matrices and adjacency lists Reading: Weiss, Chapter 9
CSE 100, UCSD: LEC 11
Page 1 of 12
Kinds of data structures
You are familiar with these kinds of d
From Trees to Graphs
You
Parents
Grandparents
Is this a tree, or.?
From Trees to Graphs
You
Parents
Grandparents
Is this a tree, or.? 1 generation = 30 years 100 generations over the last 3000 years 2^100 = 1.267x10^30 (How many people are on earth?)
Intr
Comparing DFS and BFS for shortest path finding
Either depth-first or breadth-first search will traverse the graph, visiting all nodes. But breadth-first search is better for the shortest-path problem in graphs In depth-first search:
you need to keep tr
Lecture 14
Connectedness in graphs Spanning trees in graphs Finding a minimal spanning tree Time costs of graph problems and NP-completeness Finding a minimal spanning tree: Prim's and Kruskal's algorithms Intro to disjoint subsets and union/find Reading
Lecture 18
Separate chaining Dictionary data types Hashtables vs. balanced search trees A hashtable implementation: java.util.Hashtable Reading: Weiss, Ch 5
CSE 100, UCSD: LEC 18
Page 1 of 30
Open addressing vs. separate chaining
Linear probing, double
CSE 100
Advanced Data Structures
Overview of course requirements Outline of CSE 100 topics Review of trees Helpful hints for team programming Information about computer accounts
CSE 100, UCSD: LEC 1
Page 1of 25
CSE 100 web pages
All information relate