Recent Changes - Search:

Oktatás

* Programozás 1
  + feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

Teaching

* Programming 1 (BI)
  ◇ exercises
  ◇ quick link

* Scripting Languages
  ◇ exercises
  ◇ quick link

teaching assets


Félévek

* aktuális (2023/24/2)
* archívum


Linkek

* kalendárium
   - munkaszüneti napok '20
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C++
* C#
* Clojure
* D lang.
* Java
* Nim
* Scala


[ edit | logout ]
[ sandbox | passwd ]

20130211a

Anagram

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once.

Examples:

  1. listen = silent
  2. A gentleman = Elegant man
  3. Clint Eastwood = Old west action
  4. more

Write a function that receives two strings and decides if the second string is an anagram of the first one.

The exercise can be solved in different ways. There is a trivial method, but I'd like to see a non-trivial solution. Thus, try to find at least two different approaches to solve this exercise.

Tip

As you can see from the examples, whitespaces and upper and lower case letters don't matter. Use a function that receives a string and returns it in a normalized form. Example: normalize("Clint Eastwood") == "clinteastwood".

Cloud City

  

Blogjaim, hobbi projektjeim

* The Ubuntu Incident
* Python Adventures
* @GitHub
* heroku
* extra
* haladó Python
* YouTube listák


Debrecen | la France


[ edit ]

Edit - History - Print *** Report - Recent Changes - Search
Page last modified on 2017 August 04, 09:56