goldesjuan / sopa-de-letras

0 stars 0 forks source link

sopa-de-letras

Simple solution to solve a word puzzle.

To start the server run

npm start

Website

Shows a super simple website with a button that makes a hardcoded request to the "solucion" api and then shows the result

localhost:3000/sopadeletras

API

[POST] /sopadeletras/solucion

receives an input stream with a series of cases, each case being two numbers (n & m) between 1 and 100 followed by n rows with m letters each and a word to find all occurences of. Returns an array with the number of occurrences of the given word for each case. The search is case insensitive and in 8 posible directions.

Tests

To view tests run:

npm test