code: private static boolean isPermutation(List<?> first, List<?> second) {
      if (first.size() != second.size()) {
        return false;
      }
      ObjectCountHashMap<?> firstCounts = counts(first);
      ObjectCountHashMap<?> secondCounts = counts(second);
      if (first.size() != second.size()) {
        return false;
      }
      for (int i = 0; i < first.size(); i++) {
        if (firstCounts.getValue(i) != secondCounts.get(firstCounts.getKey(i))) {
          return false;
        }
      }
      return true;
    }
docs: Returns {@code true} if the second list is a permutation of the first.