Skip to content

matiasfessia/longest-repeated-subset

Repository files navigation

Longest Repeated Subset Challenge

Overview

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'].

Setup

Clone this repo wherever you want and just run the following command inside the project

npm install

Resolve the challenge

Just run

npm start

Run tests

I have written some test using Jest. You can run it using

npm run test

Contributing

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.

Authors

Matias Fessia

License

Released under the MIT license

About

Longest Repeated Subset Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published