old_contents: # Time:  O(n)
  # Space: O(n)
  
  class Solution(object):
      def canPermutePalindrome(self, s):
          """
          :type s: str
          :rtype: bool
          """
          return sum(v % 2 for k, v in collections.Counter(s).iteritems()) <  2
  
new_contents: # Time:  O(n)
  # Space: O(1)
  
  class Solution(object):
      def canPermutePalindrome(self, s):
          """
          :type s: str
          :rtype: bool
          """
          return sum(v % 2 for k, v in collections.Counter(s).iteritems()) <  2
  
subject: Update palindrome-permutation.py