About 8,270,000 results
Open links in new tab
  1. hashmap - Hash Map in Python - Stack Overflow

    I want to implement a HashMap in Python. I want to ask a user for an input. depending on his input I am retrieving some information from the HashMap. If the user enters a key of the …

  2. What is a hash map in programming and where can it be used

    Apr 7, 2010 · Hashmap is used for storing data in key value pairs. We can use a hashmap for storing objects in a application and use it further in the same application for storing, updating, …

  3. java - How can I initialise a static Map? - Stack Overflow

    Feb 3, 2009 · How would I handle a HashMap<String, String> with a String key. The Map object doesn't allow me to have a String key so I can't use unmodifiableMap (). I guess casting to a …

  4. Most efficient way to increment a Map value in Java

    Sep 17, 2008 · Map<String, Integer> map = new HashMap<>(); String key = "a random key"; int count = map.getOrDefault(key, 0); // ensure count will be one of 0,1,2,3,... map.put(key, count …

  5. java - How to convert a JSON string to a Map<String, String> with ...

    The above still results in Type safety: The expression of type HashMap needs unchecked conversion to conform to Map<String,String>. While this can be suppressed with …

  6. java - How to convert List to Map? - Stack Overflow

    List differs from Map in the conceptual way -- Map have notion of 'key, value' pair, whereas List doesn't. Given this it's unclear how exactly you going to convert from List to Map and back.

  7. Finding Key associated with max Value in a Java Map

    May 6, 2011 · What is the easiest way to get key associated with the max value in a map? I believe that Collections.max(someMap) will return the max Key, when you want the key that …

  8. Difference between HashSet and HashMap? - Stack Overflow

    May 5, 2010 · Apart from the fact that HashSet does not allow duplicate values, what is the difference between HashMap and HashSet in their implementation? It's a little bit vague …

  9. collections - Printing HashMap In Java - Stack Overflow

    HashMap<K,V> HM = new HashMap<>(); //empty System.out.println(HM); //prints key value pairs enclosed in {} This works because the toString() method is already over-ridden in the …

  10. Is a Python dictionary an example of a hash table?

    Sep 22, 2008 · One of the basic data structures in Python is the dictionary, which allows one to record "keys" for looking up "values" of any type. Is this implemented internally as a hash …