A leetcode based RESTful testcase generator API.
For comprehensive documentation visit - LC/tcg API docs
- Local -
http://localhost:5000 - Remote -
https://lc-tcg-api.cyclic.app/choose remote server when using the api documentation to try out endpoints
GET /api/arrays/0| Parameter | Type | Description |
|---|---|---|
- |
- |
no parameter |
RETURNS : a random array
POST /api/arrays/1| Parameter | Type | Description |
|---|---|---|
count |
number |
Required. Number of arrays to generate |
minSz |
number |
Required. Minimum possible array size |
maxSz |
number |
Required. Maximum possible array size |
minEle |
number |
Required. Minimum possible array element size |
maxEle |
number |
Required. Maximum possible array element size |
uniqueEle |
boolean |
Required. True if all elements in array should br unique |
RETURNS : A list of count number of arrays each of size in range [minSz,maxSz] having elements in range [minEle,maxEle]
Clone the project
git clone https://github.com/DeweshSoc/lc_tcg.gitGo to the project directory
cd lc_tcgInstall dependencies
npm install .Start the server
npm run startServer available at http://localhost:5000