readme - Once the table is populated I use the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Jovan Chohan CS60, Spring 2008 Project 2 README For this project, the functions in hashtable.h were implemented, as well as a hash function to from Kernigan and Ritchie, "The C Programming Language" page 108, and some linked list functions that I thought would be useful. The linked list functions I made were CreateLNode, searchLNode, and insertLNode. These functions made implementing the hashtable functions much simpler for me. To run my program, all you need to do is make, and then type ./countWords<inputFile.txt>wordTable.txt. I take in one word at a time from the input file, strip the word of lower-case letters and non alpha-numeric characters, and then use the HT_Install function to put them into my hashtable.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Once the table is populated, I use the HT_getfirstelement and HT_getnextelement functions to populate an array of HT_Elements. I then use qsort on the array of HT_Elements and print out the list in numeric order as well as alphabetical order. The only noticable error with my program is that in the sherlock holmes text, the word employe appears with a hashmark above the last e. I could not find a way to eliminate this e with the hashmark from the text, so the word EMPLOYe with the hashmarked e appears in my final wordcount for sherlock holmes....
View Full Document

This note was uploaded on 05/17/2008 for the course CS 60 taught by Professor Holl during the Spring '97 term at UCSB.

Ask a homework question - tutors are online