Two string checker for anagrams (with hardcore static analysis)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE.txt
README.md
pom.xml
run.sh

README.md

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);