We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Strings
  4. Making Anagrams
  5. Discussions

Making Anagrams

Problem
Submissions
Leaderboard
Discussions
Editorial
Topics

    You are viewing a single comment's thread. Return to all comments →

  • ASHWIN_18
    5 years ago+ 1 comment

    simple

    def makingAnagrams(s1, s2):
        # Complete this function
        k=[c for c in s1]
        l=list()
        for m in s2:
            if m in k:
                k.remove(m)
            else:
                l.append(m)
        
        
        return (len(k)+len(l))
    
    9|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature