Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Latest commit

 

History

History
59 lines (41 loc) · 1.69 KB

README.md

File metadata and controls

59 lines (41 loc) · 1.69 KB

anagram

License: MIT Build Status codecov Codacy Badge

Two string checker for anagrams

Details

Two strings are anagrams if they are written using the same exact letters. For example, ‘Eleven plus two’ and ‘Twelve plus one’ are meaningful anagrams of each other.

Requirements

  • Maven 3 (using mvn 3.5.2 version)
  • Java 8 (using 1.8.0_131)

How to build

In terminal run command:

mvn clean install

How to run

After building, run:

./run.sh <first_sentence> <second_sentence>

# Example:
./run.sh "Eleven plus two" "Twelve plus one"

Or calling jar directly:

java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar <first_sentence> <second_sentence>

Examples:

java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar aaaa aaaa

Exact anagram: TRUE
Meaningful anagram: TRUE
java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar "Eleven plus two" "Twelve plus one"

Exact anagram: FALSE
Meaningful anagram: TRUE

Notes:

  • Using Cactoos library (link);
  • Using Qulice for "hardcore" static analysis (link);