code: public static <K,V> Map<V,K> array_flip(Map<K,V> map) {
          Map<V,K> flipped = new HashMap<>();
          for(Map.Entry<K,V> entry : map.entrySet()) {
              flipped.put(entry.getValue(), entry.getKey());
          }
          return flipped;
      }
docs: It flips the key and values of a map.
  
  @param <K>
  @param <V>
  @param map
  @return