Review for Exam 1 - PowerPoint PPT Presentation

About This Presentation
Title:

Review for Exam 1

Description:

... big 'theta', and big 'omega' Relative growth rates of various ... Next project will be done in groups of two to three people. Please email me your group members ... – PowerPoint PPT presentation

Number of Views:9
Avg rating:3.0/5.0
Slides: 12
Provided by: csF2
Learn more at: http://www.cs.fsu.edu
Category:
Tags: exam | omega | project | review

less

Transcript and Presenter's Notes

Title: Review for Exam 1


1
Review for Exam 1
  • Andy Wang
  • Data Structures, Algorithms, and Generic
    Programming

2
String Class
  • Two major advantages of C strings over C
    strings
  • Three characteristics of a proper type
  • Problems with self-assignments
  • Type casting operator

3
BitVector and Bit Operations
  • Truth tables for , , ,
  • Shifts ltlt, gtgt
  • How to perform circular shifts
  • How to create a bit mask
  • How to access the nth bit in an array of unsigned
    char

4
BitVector and Bit Operations
  • How to get from one bit pattern to another with
    appropriate bit mask and bit operations (10010101
    ? 11010101)
  • How to use BitVector to find prime numbers
  • A short program to manipulate bits

5
Hash Functions/Hash Tables
  • Hash functions
  • Description
  • Properties
  • Problems with various functions
  • Pre-generated randomness
  • Three design principles for hashing a sequence of
    keys

6
Hash Functions/Hash Tables
  • Tricky implementation details to avoid duplicate
    entries and slow negative lookups
  • How to design a hash function with certain
    properties

7
Templates
  • Implementation of simple template functions
  • Implementation of simple template classes
  • Use of simple template classes

8
A Generic Vector Class
  • Declarations
  • TVectorltintgt intVector(30)
  • TVectorltfloatgt floatVector(5)
  • Difference between the copy constructor and the
    assignment operator
  • How to implement PopFront

9
Search Algorithms
  • Sequential search lower_bound search
  • Requirements
  • Invariants
  • Complexity
  • Definition of invariants
  • Steps to show correctness

10
Algorithm Complexity
  • Big O, big theta, and big omega
  • Relative growth rates of various functions
  • Complexity analysis
  • Various loop compositions
  • Sequential and binary search

11
Announcement
  • Next project will be done in groups of two to
    three people
  • Please email me your group members
  • Or please email me if you need to find a group
  • I will require development journals from each
    group, signed by all members of the group
Write a Comment
User Comments (0)
About PowerShow.com