Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Anagram Calculator

This specification is for a REST-like service that will take a given word and, after confirming that it exists in a given dictionary, will return any anagrams of that word.

Application Requirements

  • The application must be written in Spring Boot
  • The application must use the dictionary located here

API specification

Request

  • GET /word/:word

Response

  • Returns 200 OK if the word exists in the dictionary.

    GET /word/glare
    
    HTTP 200 OK
    
    {
        "word": "glare",
        "anagrams": [
          "Alger",
          "lager",
          "large",
          "regal"
        ]
    }
    

    Notes:

    • The list of words in anagrams must not contain the requested word itself.
    • The list of words in anagrams must be sorted alphabetically.
    • The list of words in anagrams must be returned in their original case.
  • Returns 404 Not Found if the word does not exist in the dictionary, with the response body

    GET /word/asdfasdf1234
    
    HTTP 404 Not Found
    
    { "message" : "Couldn't find word asdfasdf1234" }
    
  • Returns 404 Not Found if the word is not specified (GET /word). The response body here is irrelevant

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors