emersys-anagram

You need to have nodejs & npm installed.
Run following command to install dependencies: npm i
Run the cli (main.ts) with following command: npx ts-node ./main.ts
Run tests with: npm test

Rules

  • Use Javascript or Typescript when solving the problem.
  • Use the provided GitHub repository to submit your solution.
  • Create a Pull Request when your solution is ready and send a link to it via E-mail.
  • You have 3 days to submit your solution.

Problem

The task is to write a CLI program which finds all anagrams of the user's input word in a dictionary.

  1. The dictionary is a plain text file (wordlist.txt) which contains one word per line.
  2. The program should handle anagram-requests as fast as possible preferably in constant time.
  3. The program should ask for the next user input after printing the previous result.
  4. Write a "production ready" code which you'd proudly push to master, preferably with tests.