Tags:
create new tag
view all tags

Tree Lab: Word count

Learning Objective(s)

  1. Learn to code a binary tree and a binary search tree
  2. Improve understanding of cohesion and coupling
  3. Improve skill for developing test cases for best, average, worst situations

Overview of the problem

You need to do a word count on a text file. You must use a binary search tree to store the words.

Specifics

  • You may be case sensitive.
  • You can treat non characters and non white spaces as part of the word.
  • The filename should come from the command line (but this should be the very last thing you work on)

Design components

  • In your design decide if you will implement this with linked lists or an array. Justify your choice
  • Discuss possible best, worst, and average cases
  • Your tree should not know what is being stored in it.

Optional improvements

  • Make your code case insensitive.
  • Ignore non characters/non white spaces
  • Make the binary search tree an AVL tree
Topic revision: r1 - 2021-09-17 - cathybareiss
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback