code: private static boolean isPermutation(List<?> first, List<?> second) {
      if (first.size() != second.size()) {
        return false;
      }
      Multiset<?> firstMultiset = HashMultiset.create(first);
      Multiset<?> secondMultiset = HashMultiset.create(second);
      return firstMultiset.equals(secondMultiset);
    }
docs: Returns {@code true} if the second list is a permutation of the first.