Retired

Where my anagrams at? (retired)

28,266 of 83,126sandbochs

Description:

What is an anagram? Well, two words are anagrams of each other if they both contain the same letters. For example:

'abba' & 'baab' == true

'abba' & 'bbaa' == true

'abba' & 'abbba' == false

'abba' & 'abca' == false

Write a function that will find all the anagrams of a word from a list. You will be given two inputs a word and an array with words. You should return an array of all the anagrams or an empty array if there are none. For example:

anagrams('abba', ['aabb', 'abcd', 'bbaa', 'dada']) => ['aabb', 'bbaa']

anagrams('racer', ['crazer', 'carer', 'racar', 'caers', 'racer']) => ['carer', 'racer']

anagrams('laser', ['lazing', 'lazy',  'lacer']) => []
Strings
Algorithms

Stats:

CreatedSep 19, 2013
Warriors Trained132275
Total Skips15403
Total Code Submissions310251
Total Times Completed83126
JavaScript Completions28266
CoffeeScript Completions140
Ruby Completions4282
Haskell Completions1310
Python Completions41212
C# Completions5362
PHP Completions1996
R Completions107
Objective-C Completions14
Rust Completions642
Go Completions725
Factor Completions5
Total Stars1481
% of votes with a positive feedback rating89% of 7164
Total "Very Satisfied" Votes5808
Total "Somewhat Satisfied" Votes1175
Total "Not Satisfied" Votes181
Ad
Contributors
  • sandbochs Avatar
  • jhoffner Avatar
  • xcthulhu Avatar
  • bkaes Avatar
  • GiacomoSorbi Avatar
  • donaldsebleung Avatar
  • Chrono79 Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • Souzooka Avatar
  • mentalplex Avatar
  • hobovsky Avatar
  • username0 Avatar
  • user8436785 Avatar
  • akar-0 Avatar
  • Kacarott Avatar
  • tri@ Avatar
  • Maxi_Mega Avatar
  • Wei-Ting Yang Avatar
Ad