Created
March 2, 2019 19:33
-
-
Save mfifth/70a7e77ba2da16412d473000bca1f18f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So what you would do is find any letters within the string that show up at least twice. From there you look at the next letter beside it and save that in some sort of entry. That is the substring to beat. Then you run through the rest of the letters to see if anything can beat that record. | |
You do that so on and so forth until you reach the end of your substrings and then return the longest one the program found. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment