Search:

Type: Posts; User: jocdrew21

Search: Search took 0.11 seconds.

  1. Thread: HashMap

    by jocdrew21
    Replies
    9
    Views
    1,132

    Re: HashMap

    I want to take the name and turn it into a integer value 1-22 since my HashMap is size of 22.

    Something like this but I know it does't work...



    int value = (int)name % 22;
  2. Thread: HashMap

    by jocdrew21
    Replies
    9
    Views
    1,132

    Re: HashMap

    I think this answered my question. Fired at the hip at this one.



    //play with Hash Tables
    void setNames(Node node)
    {
    HashMap<Node, Integer> map = new HashMap<Node, Integer>(22);
    ...
  3. Thread: HashMap

    by jocdrew21
    Replies
    9
    Views
    1,132

    Re: HashMap

    I was wondering if I was over looking something and there was a way to just simply send in a name and place it in a hashTable. Perhaps send in a Node and index it by a string value inside of it.
  4. Thread: HashMap

    by jocdrew21
    Replies
    9
    Views
    1,132

    HashMap

    When learning HashMaps in C++ I had to create the whole algorithm. In the code I created I could simply place a string into the method and it would store the names for me by turning the string into a...
Results 1 to 4 of 4