Download Data Structures and Algorithms: A Summary

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Data Structures and Algorithms
A SUMMARY
Data
Structures
Arrays,
Linked lists
Queues,
Stacks
Trees
Priority
Queues
Maps
Ordered
Maps
Graphs
Underlying Data
Structures
Main Operations
Data Structures
Data
Structures
Arrays,
Linked lists
Underlying Data
Structures
Main Operations
Data Structures
Queues,
Stacks
Arrays, Linked lists
Trees
Arrays, Linked structures
Priority
Queues
Arrays, Linked lists, Heaps
Maps
Arrays, Hash tables
Ordered
Maps
Sorted arrays, Skip lists,
Binary search trees , AVL
trees, (2,4) trees
Graphs
Adjacency lists, matrices
(arrays), Edge lists
Data
Structures
Arrays,
Linked lists
Underlying Data
Structures
Main Operations
Data Structures
• Get, Set, Traverse, Insert, Delete
Queues,
Stacks
Arrays, Linked lists
• Insert: enqueue, push
• Delete: dequeue, pop
Trees
Arrays, Linked structures
• Children, Parent
• Traverse: preorder, inorder,
postorder, breadth-first
Priority
Queues
Arrays, Linked lists, Heaps
• Insert: put
• Delete: removeMin
• Set: replaceKey, replaceValue
Maps
Arrays, Hash tables
• Find: get
• Insert: put; Delete: remove
Ordered
Maps
Sorted arrays, Skip lists,
Binary search trees , AVL
trees, (2,4) trees
• floorEntry, ceilingEntry
• subMap
Graphs
Adjacency lists, matrices
(arrays), Edge lists
• getAdjacentVertices, getEdge
• Insert/delete vertex/edge
• Traverse: depth-first, breadth-first
Data
Structures
Arrays,
Linked lists
Underlying Data
Structures
Main Operations
Data Structures
• Get, Set, Traverse, Insert, Delete
Queues,
Stacks
Arrays, Linked lists
• Insert: enqueue, push
• Delete: dequeue, pop
Trees
Arrays, Linked structures
• Children, Parent
• Traverse: preorder, inorder,
postorder, breadth-first
Priority
Queues
Arrays, Linked lists, Heaps
• Insert: put
• Delete: removeMin
• Set: replaceKey, replaceValue
Maps
Arrays, Hash tables
• Find: get
• Insert: put; Delete: remove
Ordered
Maps
Sorted arrays, Skip lists,
Binary search trees , AVL
trees, (2,4) trees
• floorEntry, ceilingEntry
• subMap
Graphs
Adjacency lists, matrices
(arrays), Edge lists
• getAdjacentVertices, getEdge
• Insert/delete vertex/edge
• Traverse: depth-first, breadth-first
General Algorithm Types
Types
Characteristics
Brute Force
•
•
try all possibilities
usually the baseline algorithm
Examples
Basic pattern matching
General Algorithm Types
Types
Characteristics
Brute Force
•
•
try all possibilities
usually the baseline algorithm
Basic pattern matching
Greedy
•
given multiple possibilities at each
iteration
select the ‘best’ one and do not look back
may not be optimal for some problems
Dijkstra (Shortest Path),
Kruskal, Prim (Minimum
Spanning Tree), Huffman
(Compression)
•
•
Examples
General Algorithm Types
Types
Characteristics
Brute Force
•
•
try all possibilities
usually the baseline algorithm
Basic pattern matching
Greedy
•
given multiple possibilities at each
iteration
select the ‘best’ one and do not look back
may not be optimal for some problems
Dijkstra (Shortest Path),
Kruskal, Prim (Minimum
Spanning Tree), Huffman
(Compression)
decompose into separate subproblems
and compose solutions
usually recursive and top-down
Mergesort, Quicksort
•
•
Divide and
Conquer
•
•
Examples
General Algorithm Types
Types
Characteristics
Brute Force
•
•
try all possibilities
usually the baseline algorithm
Basic pattern matching
Greedy
•
given multiple possibilities at each
iteration
select the ‘best’ one and do not look back
may not be optimal for some problems
Dijkstra (Shortest Path),
Kruskal, Prim (Minimum
Spanning Tree), Huffman
(Compression)
decompose into separate subproblems
and compose solutions
usually recursive and top-down
Mergesort, Quicksort
decompose into reoccurring subproblems
and compose solutions
store “sub-solutions” and use bottom-up
Longest Common
Subsequence, Matrix
Chain Multiplication
•
•
Divide and
Conquer
•
•
Dynamic
programming
•
•
Examples
Leading to Term Project
 Lab exercises
 Understanding of Data Structures and Algorithms (DS&A)
 Homework assignments
 Implementation of DS&A

further understanding and implementation issues
 Term project
 design/choose/implement DS&A

deeper understanding tradeoffs and utility
Problem Solving & Term Project
 Quality of solution
 Accuracy

Algorithms
 Speed of solution
 Time

Algorithms and data structures
 Space usage of solution
 Memory

Data structures
Final Exam
 May 1, Monday, 6-8pm, OLS 130 (regular classroom)
 As stated in the syllabus
 [NOT common exams on May 3, which might have time
conflicts for some of you]
 Graphs, Text Processing, Search Trees, Sorting
 Mother’s Day Special
 Extra credit
More questions
 ~30 points

Related documents