Extremely basic api and frontend for determining if a provided sequence is a "pyramid word".
A "pyramid word" is any word that contains characters with linearly increasing frequency, starting at 1. e.g. "banana" has 1 b
, 2 n
, and 3 a
.
This project does not attempt to validate that a provided sequence is necessarily a word, only that it contains alpha characters with linear frequency.
Note: Requires Node.js version 10+
npm install
npm run build
npm run start
# Navigate to https://localhost:3000
- Build and run server
- Navigate to https://localhost:3000
- Use UI to check for pyramid words
OR
- Build and run server
curl https://localhost:3000/api/pyramid?q=<word>
to check for pyramid words
npm run test