Advertisement
Guest User

BinarySearchTree.java

a guest
Mar 26th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public class BinarySearchTree extends LinkedBinaryTree {
  2. /* readIn performs the following opearations:
  3. (1) reads from fileName word by word
  4. (2) for every new word found in fileName a new BTNode is created and added to T according
  5. to the rules of BST insertion
  6. (3) for every duplicate word wordCounter of the corresponding BTNode is incremented */
  7. public void readIn(String fileName) { }
  8. /* maxSearchPath finds and returns the length of the longest search path in T */
  9. public int maxSearchPath() { }
  10. /* printWordsSorted prints all distinct words found in fileName, in sorted order */
  11. public void printWordsSorted() { }
  12. /* printTenMostCommonWords finds and prints ten most common words from fileName together
  13. with their respective wordCounter-s */
  14. public void printTenMostCommonWords() { }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement