Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Re: Dictionary using Distributed Hash Table and BST Tree

    There is a substring() method call on line 39 where the value of the index is out of bounds/past the end of the String.
    Look at the code on that line and see why: how long is the String & what is...
  2. Re: Dictionary using Distributed Hash Table and BST Tree

    When posting code please wrap your code with


    <YOUR CODE HERE>

    to get highlighting and preserve formatting.
  3. Re: Dictionary using Distributed Hash Table and BST Tree

    How/where did you get the algorithm for the code in the hash() method?

    What are the meanings for the constants: 53 and 96?


    Execute the method with single letters from a to z and see what is...
  4. Re: Dictionary using Distributed Hash Table and BST Tree

    Yes, that is what lexical means
  5. Re: Dictionary using Distributed Hash Table and BST Tree

    So the outer layer needs the hash and the inner layer uses the natural lex order?
  6. Re: Dictionary using Distributed Hash Table and BST Tree

    Are you asking if a word needs a different hashcode for each position it goes to in the container where you are storing it? I don't know the specific algorithm that you are trying to code for to be...
  7. Re: Dictionary using Distributed Hash Table and BST Tree

    Can you explain the problem?
  8. Re: Dictionary using Distributed Hash Table and BST Tree

    Make the class static.
  9. Re: Dictionary using Distributed Hash Table and BST Tree

    If bst[k] is null, where do you assign any values to the elements of the bst array?
    There are two steps in using an array of objects:
    1) define the array
    2) fill the array elements with instances...
  10. Re: Dictionary using Distributed Hash Table and BST Tree

    What code is on line 244? What variables are used on that line? Which of those variables is null?


    What variable is the table? Where is it defined?
  11. Re: Dictionary using Distributed Hash Table and BST Tree

    What variable on line 244 is null? See post#2
  12. Re: Dictionary using Distributed Hash Table and BST Tree

    Please post the full text of the error message.
  13. Re: Dictionary using Distributed Hash Table and BST Tree

    That was a big waste of time. Posting code with so many errors.

    Can you explain what the problem with the code is now?

    For testing please put all the answers to the questions the code asks in...
  14. Re: Dictionary using Distributed Hash Table and BST Tree

    Can you post the code that shows what you printed and the statement where the NPE occurs.
    It normally takes a variable with a null value to create a NPE. Did you print ALL of the variables?

    The...
  15. Re: Dictionary using Distributed Hash Table and BST Tree

    Look at line 249 in the code and find which variable has the null value. Then backtrack in the code t see why that variable does not have a valid non-null value.
    If you can't tell what variable is...
Results 1 to 15 of 15