CS 173 Introduction to Computer Science II Spring 2019

Test 2 Review and Study Guide

General

  • 150 points (15% of your final grade)
  • Yes, it will probably be challenging!
  • Individual effort, no books, notes, or electronic devices
  • You will have 65 minutes to complete each test.
  • Let me know if you have any need of special accommodations before taking the test.
  • Use a pencil (bring one or more sharpened and ready to go)! Also bring an eraser.
  • If you miss the test, you will earn a zero (unless you have prior permission or a clearly documented and incident of unforseen hardship such as illness or death in the family).

Structure and Format

  • Write a java class that represents a ...
  • Write a java method that ...
  • Write a java code segment to ...
  • Describe an algorithm that ...
  • Give the following java code ... , give the output.
  • Other

Content

  • Chapter 6: Queues, Deques
    • Queues
      • basic operations: enqueue, dequeue, first, size, isEmpty
      • implementations: SLL, array, etc
      • Big-Oh run-time complexity
      • Chapter problems: 1, 3, 4, 5, 7, 9, 10 11, 12, 13, 14, 17, 19, 21, 23, 24, 25, 30, 31, 32, 34, 35
    • Deques
      • basic operations: first, last, addFirst, addLast, removeFirst, removeLast, size, isEmpty
      • implementations: DLL, array, etc
      • Big-Oh run-time complexity
    • Chapter problems: 1, 3, 4, 5, 7, 9, 10 11, 12, 13, 14, 17, 19, 21, 23, 24, 25, 30, 31, 32, 34, 35
  • Chapter 7: Lists (revisited), Iterators, Iterables
    • Position interface
      • getElement()
    • Iterators
      • methods: hasNext(), next()
    • Iterables
      • iterator() function
      • foreach loop - for (E v : C)
    • Chapter problems: 1, 2, 3, 4, 13, 15, 16, 17, 18, 19, 50
  • Chapter 8: Trees
    • Basic terminology: root, parent, child, sibling, ancestor, decendant, internal node, external (leaf) node, subtree, node depth, height of a tree, etc
    • Traversal algorithms: pre-order, post-order, breadth-first
    • linked representation (TreeNode)
    • applications: file systems, hierarchies, organization charts, document structures, etc
    • Binary Trees
      • left, right, sibling
      • in-order traversal
      • linked representation (TreeNode)
      • ArrayList representation
      • applications: expression trees
    • Chapter problems: 1, 2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 33, 37, 39, 40, 41, 42, 43, 45, 47, 48, 49, 52, 54, 55, 56, 57, 58, 59, 61, 62, 63, 65, 67


Copyright © 2019, David A. Reimann. All rights reserved.