halfghaninne / ruby-toy__check-if-anagrams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Toy Problem - Ruby

Check if Anagrams

Objectives

  1. Practice thinking through abstract algorithms.
  2. Properly use common data structures.

Anagrams are words made from the same set of characters. Like this:

We would say that "chaser" and "search" are anagrams; because if you rearrange the letters in one of the words, you can end up with the other word. Anagrams have exactly the same letters--no more or less of any letter--but arranged differently.

Write an algorithm that figures out if two strings are anagrams for each other. If the strings are anagrams, the algorithm should return true as its final response. Otherwise, it should return false.

About

License:GNU General Public License v2.0


Languages

Language:Ruby 97.4%Language:Shell 2.6%