Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 671 Bytes

File metadata and controls

26 lines (17 loc) · 671 Bytes

Is anagram

Instructions

Given two strings, implement a function to determine if the second string is an anagram of the first. An anagram is a word, phrase, or name formed by rearranging the letters of another, such as cinema, formed from iceman. Only consider characters, not spaces or punctuation. Consider capital letters to be the same as lower case.

challenge | solution

Examples

anagrams('rail safety', 'fairy tales') --> True

anagrams('RAIL! SAFETY!', 'fairy tales') --> True

anagrams('Hi there', 'Bye there') --> False

Hints

Hint 1 Use frequency counter.