Skip to content

2015-1: Nag A Ram

Write a function that takes two character vectors as its left and right arguments and returns 1 if they are anagrams of each other. An anagram of a string uses all of the letters of the string ignoring word spacing, capitalisation, and punctuation.

Examples:

      'anagram' (your_function) 'Nag A Ram' 
1
      'Dyalog APL' (your_function) 'Dog Pay All' 
1
      '' (your_function) '  !#!' 
1
      'abcde' (your_function) 'zyxwvu'
0
your_function ←

Solutions

Video Thumbnail YouTube

Chat transcript Code on GitHub