countryqueen / datastructures4 Goto Github PK
View Code? Open in Web Editor NEWCreate a binary tree to count the number of each word in a text document. Start by creating a modified B-Tree. The B-Tree should be modified to record the Word and a word count. Scan a text document and parse each word found. Remove and discard all punctuation and make all words lower case. One at a time, add each word to the tree. If the word is already in the tree, increment the counter, otherwise, add the new word to the B-Tree setting the new words counter to one. Once the document has been scanned, use in order traversal to print the words in alphabetical order with the word count.