University of Utah School of Computing
CS 2420:
Introduction to Computer Science II
Homework 7
Assigned: Friday, Oct 31, 2014
Due: Monday, Nov 10, 2014, at 3pm.

Homework 7

Part I: Course eval

You should receive an email with a link to provide mid-semester feedback. Please do so as it will give us an opportunity to address any problems with and generallyimprove the course.

Part II: Implement a Binary Seach Tree

Implement a Binary Search Tree. At the minimum your tree should support insert(), remove(), and find(). While insert() and remove() can be implemented iteratively, you will probably find it easier if they are implemented recursively. I recommend starting from the BinaryTree from Lab and addin add insert(), remove() and find().

Part III: Implement a iterative tree traversals

Implement pre-order, post-order, in-order and level-order traversals in an iterative fashion using your stacks and queues from the last assignment.

Part IV: Timing results

Use your binary search tree to sort variously sized lists of numbers (insert the numbers then run in-order traversal) and compare the result to your quicksort implementation. Is the iterative or recursive traversal faster?

Part V: Written Homework

What to hand in

Create a web page for the assignment. Add a description of your program, graphs and the conclusions you've drawn. Use the CADE online handin system to handin your source code. Please zip and handin your entire project directory (including an info.txt file). If you work in a team only one of you need to submit the source code.

Grading

Each homework assignment will receive a grade out of 100 points. This week, the available points will be broken down like so:
  • 30 points: Binary Search Tree
  • 20 points: Iterative Tree Traverals
  • 10 points: Graphs and conclusions
  • 10 points: Comments describing the class, each method as well as the interesting pieces of the code itself
  • 10 points: Elegence of programming
  • 10 points: Figures and web page
  • 10 points: Written Homework