Small project to crack the secret phrase for trustpilot code challenge.
349
Small project to crack the secret phrase for trustpilot code challenge. To run this code, run the following command: docker run kiksen1987/dotnetcore -ti
This will show the progress in the terminal like so:
Starting anagram phrase matcher...
Importing words...
Creating anagram dictionary...
Generating 7 length and 4 length keys...
Fecthing all words from keys...
Number of 7 length words: 149
Number of 4 length words: 437
Finding anagrams from resultset...
Found matching anagram: nuptial tryouts stow
The hashes are not same.
Found matching anagram: nuptial tryouts tows
The hashes are not same.
Found matching anagram: nuptial tryouts twos
The hashes are not same.
Found matching anagram: tolyati upturns stow
The hashes are not same.
Found matching anagram: tolyati upturns tows
The hashes are not same.
Found matching anagram: tolyati upturns twos
The hashes are not same.
Found matching anagram: pastils turnout towy
The hashes are the same.
Result: pastils turnout towy
Runtime: 2.896
Runtime before MD5 checks: 0.118
This shows runtime to be just below 3 seconds. Only 0.118 seconds to find all combinations that are valid. Which leaves little room for improvements.
Content type
Image
Digest
Size
237.5 MB
Last updated
almost 10 years ago
docker pull kiksen1987/dotnetcore