CSCI 255 Fall 2023
Introduction to Algorithms and Discrete Structures
Archived Class
Charles Cusack
Computer Science
Hope College



CSCI 125
CSCI 255
MATH 341


Homework 12

General Comments

  • For full credit, provide context for each problem, show all calculations, and justify all answers by providing enough comments to explain your reasoning.
  • Homework assignments must be very neatly written or typeset (e.g. using Word or OpenOffice).
  • You can get up to 50% credit on a problem if you get significant outside assistance. Thus, if you are totally stuck on a problem it might be worth getting help. However, you must indicate any assistance/collaboration (See the Homework Assistance section on the Policies page). Failure to do so could result in a failing grade for the course! Note that getting help from the Help Center or me does not count as significant outside assistance, but talking with your classmates or searching on the Internet does!
  • If a problem asks for an algorithm, you should give the most efficient algorithm you can find to ensure full credit. You should also specify the complexity of the algorithm with justification, whether or not the problem asks for it.


  1. (8) IDAA 5.1 #11 (page 175)
    Give a very clear and concise description of your algorithm. You should definitely give a paragraph description of your algorithm for this one. You do not need to give the complexity of this algorithm.
  2. (8) IDAA 5.2 #11 (page 182)
    Read the problem description carefully to make sure you understand what you can and cannot do! You may modify an existing algorithm. If so, you may just explain (very clearly!) how to modify that algorithm. Make sure your algorithm is clear and complete. Don't forget to justify why your algorithm is O(n log n)
  3. (9) Traverse the binary search tree below using
    1. pre-order traversal
    2. in-order traversal
    3. post-order traversal