Midterm 2 Overview - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Midterm 2 Overview

Description:

Midterm 2 Overview Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park Overview of Topics Data structures Graph algorithms ... – PowerPoint PPT presentation

Number of Views:133
Avg rating:3.0/5.0
Slides: 14
Provided by: Chau60
Learn more at: http://www.cs.umd.edu
Category:

less

Transcript and Presenter's Notes

Title: Midterm 2 Overview


1
Midterm 2 Overview
  • Fawzi Emad
  • Chau-Wen Tseng
  • Department of Computer Science
  • University of Maryland, College Park

2
Overview of Topics
  • Data structures
  • Graph algorithms
  • Searching
  • Search trees
  • Heaps
  • Hash tables
  • Tries
  • Sorting
  • Compression

3
Topic Data Structures
  • Why data structures are important
  • Taxonomy of data structures
  • Linear
  • Hierarchical
  • Graph
  • Maps sets
  • Data structure examples
  • Relationship between elements
  • Operations supported
  • Impact on efficiency

4
Topic Graph Algorithms
  • Types of graphs
  • Operations on graphs
  • Traversals
  • Spanning trees
  • Minimal spanning trees
  • Shortest paths
  • Implementation methods

5
Topic Searching
  • Data structures for searching
  • Binary search tree
  • Heaps
  • Maps hashing
  • Index search trees (tries)
  • Multi-way search trees
  • Balanced search trees
  • Implementation maintenance
  • Insert(), delete(), find()
  • Comparing data structures
  • Advantages disadvantages

6
Topic Sorting
  • Approaches to sorting
  • Comparison sorts
  • Linear sorts
  • Properties of sorting
  • Implementing sorting
  • Comparing approaches
  • Advantages disadvantages

7
Topic Compression
  • Approaches to compression
  • Huffman encoding
  • Algorithm
  • Implementation
  • Properties

8
Midterm Question Formats
  • Multiple choice questions
  • Short 1-sentence answers
  • Write code
  • Apply describe algorithms

9
Multiple Choice Question Example
  • Sorting is different from searching because
  • Sorting is more complex
  • Searching is more complex
  • Sorting takes more space
  • Searching takes more space
  • Sorting compares two items by size
  • (circle all that apply)

10
Short 1-Sentence Answer Example
  • Sorting is different from searching because
  • (provide short 1-sentence answer)

11
Write Code
  • Given the following Java code fragment, write
    code to insert into an unsorted linked list
  • class Node
  • Object value
  • Node next
  • void insert ( Node n )
  • // place your code here
  • void BubbleSort ( Comparable a )
  • // place your code here

12
Apply Describe Algorithms
  • Given the following binary search tree
  • Draw tree after adding 9
  • Draw tree after deleting 5
  • Perform postorder traversal

10
5
30
2
25
45
13
Apply Describe Algorithms
  • Given the following graph
  • Apply depth-first search, starting at 1
  • Apply breadth-first search, starting at 1
  • Apply Djikstras algorithm, starting at 1
  • Apply Kruskals algorithm
  • Show steps
Write a Comment
User Comments (0)
About PowerShow.com