This repo has the goal to solve a challenge that I had to do and the assignment was:
Find the longest repeated subset of array elements in given array. For example, for ['b','r','o','w','n','f','o','x','h','u','n','t','e','r','n','f','o','x','r','y','h','u','n'], the longest repeated subset will be ['n','f','o','x'].
Clone this repo wherever you want and just run the following command inside the project
npm install
Just run
npm start
I have written some test using Jest. You can run it using
npm run test
I'm pretty sure that this challenge could resolve with a better approach, maybe using some kind of tree. So if you want to improve my solution or maybe you found a bug, please feel free to push a PR or create an issue.
Matias Fessia
Released under the MIT license